jeapostrophe
2017-5-24 18:03:52

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]


jeapostrophe
2017-5-24 18:03:52

mprotect failed: 7fdb09ea0000, 16384, 1, 12


jeapostrophe
2017-5-24 18:03:52

Seg fault (internal error during gc) at 0x7fdb09ea16c0


jeapostrophe
2017-5-24 18:03:52

SIGSEGV SEGV_ACCERR SI_CODE 2 fault on 0x7fdb09ea16c0```


jeapostrophe
2017-5-24 18:09:27

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.)


jeapostrophe
2017-5-24 18:10:41

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.]


mflatt
2017-5-24 18:38:23

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


jeapostrophe
2017-5-24 20:49:04

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.


lexi.lambda
2017-5-25 04:56:58

@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?


lexi.lambda
2017-5-25 04:58:14

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).


lexi.lambda
2017-5-25 04:58:50

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