parent
8e650d2a3b
commit
ee97a84884
|
|
@ -49,11 +49,13 @@ type tmemoryclass=class
|
||||||
{**
|
{**
|
||||||
@explan(说明) 获得指针字节数 %%
|
@explan(说明) 获得指针字节数 %%
|
||||||
**}
|
**}
|
||||||
|
{$ifdef linux}
|
||||||
|
return 8;
|
||||||
|
{$endif}
|
||||||
{$IFDEF win64}
|
{$IFDEF win64}
|
||||||
return 8;
|
return 8;
|
||||||
{$ELSE}
|
|
||||||
return 4;
|
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
return 4;
|
||||||
end
|
end
|
||||||
function opblocks(p,f,v); //内存存储操作
|
function opblocks(p,f,v); //内存存储操作
|
||||||
begin
|
begin
|
||||||
|
|
@ -141,13 +143,12 @@ type tmemoryclass=class
|
||||||
@explan(说明)获取底层操作工具 %%
|
@explan(说明)获取底层操作工具 %%
|
||||||
@return (t_mem_mgr)内存底层管理工具
|
@return (t_mem_mgr)内存底层管理工具
|
||||||
**}
|
**}
|
||||||
if not ifobj(_tool)then _tool := get_mem_mgr();
|
return get_mem_mgr();
|
||||||
return _tool;
|
|
||||||
end
|
end
|
||||||
function create();
|
function create();
|
||||||
begin
|
begin
|
||||||
_blocks := array();
|
_blocks := array();
|
||||||
mtool();
|
_tool := mtool();
|
||||||
end
|
end
|
||||||
function destroy();virtual;
|
function destroy();virtual;
|
||||||
begin
|
begin
|
||||||
|
|
@ -161,14 +162,14 @@ type tmemoryclass=class
|
||||||
end
|
end
|
||||||
_blocks := array();
|
_blocks := array();
|
||||||
end
|
end
|
||||||
protected
|
private
|
||||||
static _tool;
|
_tool;
|
||||||
private
|
|
||||||
_blocks; //分配的内存块;以地址为索引的数组,值为分配的大小;
|
_blocks; //分配的内存块;以地址为索引的数组,值为分配的大小;
|
||||||
end
|
end
|
||||||
//内存管理类,不支持**类型
|
//内存管理类,不支持**类型
|
||||||
type ctslctrans = class(tmemoryclass)
|
type ctslctrans = class(tmemoryclass)
|
||||||
private
|
private
|
||||||
|
_tool;
|
||||||
Fstrcdata;
|
Fstrcdata;
|
||||||
_nomalloc;
|
_nomalloc;
|
||||||
_ptr;//对象地址
|
_ptr;//对象地址
|
||||||
|
|
@ -440,6 +441,7 @@ type ctslctrans = class(tmemoryclass)
|
||||||
@param(ifset)(integer) 递归构造时使用%%
|
@param(ifset)(integer) 递归构造时使用%%
|
||||||
**}
|
**}
|
||||||
class(tmemoryclass).create();
|
class(tmemoryclass).create();
|
||||||
|
_tool := mtool();
|
||||||
_ptr := 0;
|
_ptr := 0;
|
||||||
if not(ifarray(data)and mcols(data)>3)then
|
if not(ifarray(data)and mcols(data)>3)then
|
||||||
begin
|
begin
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue