فهرست منبع

+ initialize heap in the system unit startup (but SysOSAlloc is not yet implemented)

git-svn-id: branches/wasm@48289 -
nickysn 4 سال پیش
والد
کامیت
fe7fd69d5e
2فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 3 0
      rtl/wasi/sysheap.inc
  2. 2 0
      rtl/wasi/system.pp

+ 3 - 0
rtl/wasi/sysheap.inc

@@ -22,8 +22,11 @@
 
 function SysOSAlloc(size: ptruint): pointer;
 begin
+  DebugWriteLn('SysOSAlloc');
+  SysOSAlloc:=nil;
 end;
 
 procedure SysOSFree(p: pointer; size: ptruint);
 begin
+  DebugWriteLn('SysOSFree');
 end;

+ 2 - 0
rtl/wasi/system.pp

@@ -171,5 +171,7 @@ begin
   { To be set if this is a library and not a program  }
   IsLibrary := FALSE;
 {$endif def FPC_HAS_FEATURE_DYNLIBS}
+  { Setup heap }
+  InitHeap;
   DebugWriteLn('System unit initialization end');
 end.