Deprecate PHP (#13838)
This commit is contained in:
parent
160d5fe589
commit
c167261735
1 changed files with 1 additions and 16 deletions
|
|
@ -8,22 +8,7 @@
|
||||||
|
|
||||||
# "Stack GC" for embedded devices or ultra performance requirements.
|
# "Stack GC" for embedded devices or ultra performance requirements.
|
||||||
|
|
||||||
when defined(nimphpext):
|
when defined(useMalloc):
|
||||||
proc roundup(x, v: int): int {.inline.} =
|
|
||||||
result = (x + (v-1)) and not (v-1)
|
|
||||||
proc emalloc(size: int): pointer {.importc: "_emalloc".}
|
|
||||||
proc efree(mem: pointer) {.importc: "_efree".}
|
|
||||||
|
|
||||||
proc osAllocPages(size: int): pointer {.inline.} =
|
|
||||||
emalloc(size)
|
|
||||||
|
|
||||||
proc osTryAllocPages(size: int): pointer {.inline.} =
|
|
||||||
emalloc(size)
|
|
||||||
|
|
||||||
proc osDeallocPages(p: pointer, size: int) {.inline.} =
|
|
||||||
efree(p)
|
|
||||||
|
|
||||||
elif defined(useMalloc):
|
|
||||||
proc roundup(x, v: int): int {.inline.} =
|
proc roundup(x, v: int): int {.inline.} =
|
||||||
result = (x + (v-1)) and not (v-1)
|
result = (x + (v-1)) and not (v-1)
|
||||||
proc emalloc(size: int): pointer {.importc: "malloc", header: "<stdlib.h>".}
|
proc emalloc(size: int): pointer {.importc: "malloc", header: "<stdlib.h>".}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue