continuous-integration/drone/push Build is passing
Reorganize all source files into a hierarchical namespace structure with dot-separated unit names matching directory paths. Major changes: - src/prog/ -> src/app/ (app.*.pas) - src/fault/ -> src/arch/x86/fault/ (arch.x86.fault.*.pas) - src/isr/ -> src/arch/x86/isr/ (arch.x86.isr.*.pas) - src/include/ -> src/core/ (core.*.pas) + src/arch/x86/ - src/driver/ subtree reorganized with driver.* namespace prefixes - src/driver/storage/con/ -> src/driver/storage/ctl/ (Windows reserved name fix) - src/driver/storage/ split into con(ctl)/fs/vol/ subdirectories - src/driver/net/ flattened from l1-l5 layers to driver.net.*.pas - kernel.pas -> asuro.pas, faults.pas -> arch.x86.faults.pas - stdio.pas/syslog.pas -> io/io.stdio.pas, io/io.syslog.pas - processmanager.pas -> proc/proc.mgr.pas - lmemorymanager.pas -> memory/memory.heap.pas - Build scripts moved to toolchain/ - Added compat/ shims for lmemorymanager and types - Added doc/namespace.md tracking the refactor 197 files changed, 6292 insertions(+), 5526 deletions(-)
76 lines
1.7 KiB
ObjectPascal
76 lines
1.7 KiB
ObjectPascal
{ Compatibility shim: wasuro references the old unit name 'lmemorymanager'.
|
|
Since wasuro/ cannot be modified, this unit re-exports the public API of
|
|
memory.heap so that 'uses lmemorymanager' continues to compile. }
|
|
unit lmemorymanager;
|
|
|
|
interface
|
|
|
|
uses
|
|
memory.heap;
|
|
|
|
const
|
|
ALLOC_UNIT = memory.heap.ALLOC_UNIT;
|
|
DATA_OFFSET = memory.heap.DATA_OFFSET;
|
|
PAGE_SIZE_LMM = memory.heap.PAGE_SIZE_LMM;
|
|
TOTAL_UNITS = memory.heap.TOTAL_UNITS;
|
|
BITMAP_DWORDS = memory.heap.BITMAP_DWORDS;
|
|
SIZE_PREFIX = memory.heap.SIZE_PREFIX;
|
|
LARGE_ALLOC_MAGIC = memory.heap.LARGE_ALLOC_MAGIC;
|
|
|
|
type
|
|
PHeapPageHeader = memory.heap.PHeapPageHeader;
|
|
THeapPageHeader = memory.heap.THeapPageHeader;
|
|
|
|
procedure init;
|
|
function kalloc(size : uint32) : void;
|
|
function klalloc(size : uint32) : void;
|
|
procedure klfree(address : uint32);
|
|
function kpalloc(address : uint32) : void;
|
|
procedure kfree(area : void);
|
|
function lmm_total_free : uint32;
|
|
function lmm_page_count : uint32;
|
|
|
|
implementation
|
|
|
|
procedure init;
|
|
begin
|
|
memory.heap.init;
|
|
end;
|
|
|
|
function kalloc(size : uint32) : void; inline;
|
|
begin
|
|
kalloc := memory.heap.kalloc(size);
|
|
end;
|
|
|
|
function klalloc(size : uint32) : void; inline;
|
|
begin
|
|
klalloc := memory.heap.klalloc(size);
|
|
end;
|
|
|
|
procedure klfree(address : uint32); inline;
|
|
begin
|
|
memory.heap.klfree(address);
|
|
end;
|
|
|
|
function kpalloc(address : uint32) : void; inline;
|
|
begin
|
|
kpalloc := memory.heap.kpalloc(address);
|
|
end;
|
|
|
|
procedure kfree(area : void); inline;
|
|
begin
|
|
memory.heap.kfree(area);
|
|
end;
|
|
|
|
function lmm_total_free : uint32; inline;
|
|
begin
|
|
lmm_total_free := memory.heap.lmm_total_free;
|
|
end;
|
|
|
|
function lmm_page_count : uint32; inline;
|
|
begin
|
|
lmm_page_count := memory.heap.lmm_page_count;
|
|
end;
|
|
|
|
end.
|