
mflatt: I have a process that uses a lot of memory (more than system has) and I would expect it to give me an out of memory error. Instead, I get ```unmap failed: 7fda46834000, 16384, 12 [x100]

mprotect failed: 7fdb09ea0000, 16384, 1, 12

Seg fault (internal error during gc) at 0x7fdb09ea16c0

SIGSEGV SEGV_ACCERR SI_CODE 2 fault on 0x7fdb09ea16c0```

Why does racket not just abort when the unmap/mprotect fail? (As an aside, when I run without JIT, I don’t get the segfault, but it appears to run forever.)

If I increase the number of mmaps, with: “sysctl -w vm.max_map_count=131060”, then I run out of memory (as I would otherwise expect). [Reading the manual suggest that when you unmap in the middle of a region, then it has to make two, so munmap consumes resources.]

@jeapostrophe It would make sense to abort if munmap
or mprotect
fails; I guess the current behavior is misguided optimism

mflatt: k, i’ll submit a pull request. I think the mprotect can be particular bad because it can cause the write barrier to not install.

@mflatt, @samth, @robby: Is there a recommended way to include a piece of syntax in the expansion of a macro for the purposes of letting DrRacket pick up origin and disappeared-use/binding properties without actually impacting the program in any other way?

Right now I am producing a bunch of pieces of syntax that are basically nested invocations of void
, so I end up with something silly like (let () (void (void) (void (void) (void)))) my-real-expression)
.

But I am not sure if Racket guarantees that those will get optimized away or not.