File: totalRam.sysconf.c

package info (click to toggle)
mlton 20061107-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 27,828 kB
  • ctags: 61,118
  • sloc: ansic: 11,446; makefile: 1,339; sh: 1,160; lisp: 900; pascal: 256; asm: 97
file content (8 lines) | stat: -rw-r--r-- 225 bytes parent folder | download
1
2
3
4
5
6
7
8
W32 totalRam (GC_state s) {
        W32 maxMem;
        W64 tmp;

        maxMem = 0x100000000llu - s->pageSize;
        tmp = sysconf (_SC_PHYS_PAGES) * (W64)s->pageSize;
        return (tmp >= maxMem) ? maxMem: (W32)tmp;
}