home *** CD-ROM | disk | FTP | other *** search
- Unit Memory;
-
- interface
-
- function AllocMemory(Size : Word) : Pointer;
- function FreeMemory(P : Pointer; Size : Word) : Integer;
-
- implementation
-
- function AllocMemory(Size : Word) : Pointer;
- var
- P : Pointer;
- begin
- GetMem(P, Size);
- (*writeln('Allocating ',Size,' bytes');*)
- AllocMemory := P;
- end;
-
- function FreeMemory(P : Pointer; Size : Word) : Integer;
- begin
- FreeMem(P, Size);
- (*writeln('Freeing ',Size,' bytes');*)
- FreeMemory := 0;
- end;
-
- end.