diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/system.nim | 10 | ||||
-rwxr-xr-x | lib/system/mmdisp.nim (renamed from lib/system/mm.nim) | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim index 5265c2365..7d1d2a867 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -813,11 +813,15 @@ const hostOS* {.magic: "HostOS"}: string = "" ## a string that describes the host operating system. Possible values: ## "windows", "macosx", "linux", "netbsd", "freebsd", "openbsd", "solaris", - ## "aix" + ## "aix". hostCPU* {.magic: "HostCPU"}: string = "" ## a string that describes the host CPU. Possible values: - ## "i386", "alpha", "powerpc", "sparc", "amd64", "mips", "arm" + ## "i386", "alpha", "powerpc", "sparc", "amd64", "mips", "arm". + + appType* {.magic: "AppType"}: string = "" + ## a string that describes the application type. Possible values: + ## "console", "gui", "lib". proc toFloat*(i: int): float {. magic: "ToFloat", noSideEffect, importc: "toFloat".} @@ -1570,7 +1574,7 @@ when not defined(EcmaScript) and not defined(NimrodVM): result = n.sons[n.len] include "system/systhread" - include "system/mm" + include "system/mmdisp" include "system/sysstr" include "system/assign" include "system/repr" diff --git a/lib/system/mm.nim b/lib/system/mmdisp.nim index 76b5d83bd..f28b6b931 100755 --- a/lib/system/mm.nim +++ b/lib/system/mmdisp.nim @@ -130,6 +130,12 @@ when defined(boehmgc): include "system/cellsets" elif defined(nogc): + # Even though we don't want the GC, we cannot simply use C's memory manager + # because Nimrod's runtime wants ``realloc`` to zero out the additional + # space which C's ``realloc`` does not. And we cannot get the old size of an + # object, because C does not support this operation... Even though every + # possible implementation has to have a way to determine the object's size. + # C just sucks. include "system/alloc" when false: |