Changeset 63 for branches/Transpascal/Project/System.pas
- Timestamp:
- Oct 15, 2010, 10:04:55 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/Transpascal/Project/System.pas
r60 r63 3 3 interface 4 4 5 const 6 MemoryManagerSizeType: TType = Integer; 7 5 8 type 9 TType = internal; 6 10 Void = internal; 7 11 Byte = internal; … … 16 20 Char = internal; 17 21 String = array of Char; 22 Pointer = ^Void; 23 Ordinal = (Byte, ShortInt, Word, SmallInt, Cardinal, DWord, Integer, QWord, Int64, Char); 24 Float = (Single, Double, Extended) 25 TObject = class; 18 26 27 PMemoryManager = ^TMemoryManager; 28 TMemoryManager<TSizeType: Ordinal> = record 29 GetMem: function(Size: TSizeType): Pointer; 30 FreeMem: function(P: Pointer): TSizeType; 31 ReallocMem: function(P: Pointer; Size: TSizeType): Pointer; 32 end; 33 TSystemMemoryManager = TMemoryManager<MemoryManagerSizeType>; 34 35 TSystem = record 36 MemoryManager: TMemoryManager; 37 end; 19 38 20 39 procedure Exit; internal; … … 23 42 procedure WriteLn; internal; 24 43 44 25 45 implementation 26 46 47 uses 48 MemoryManager; 49 50 initialization 51 52 finalization 27 53 28 54 end.
Note:
See TracChangeset
for help on using the changeset viewer.