3 ms·
On FreeBSD there's MAP_GUARD. From the documentation: > Instead of a mapping, create a guard of the specified size. Guards allow a process to create reservat
by kccqzy 8y ago
On FreeBSD there's MAP_GUARD.
From the documentation:
> Instead of a mapping, create a guard of the specified size. Guards allow a process to create reservations in its address space, which can later be replaced by actual mappings. mmap will not create mappings in the address range of a guard unless the request specifies MAP_FIXED. Guards can be destroyed with munmap(2). Any memory access by a thread to the guarded range results in the delivery of a SIGSEGV signal to that thread.
So it seems like a good fit for your use case, but I've never used this.
- CJefferson 8y agoThat is exactly what I want! I wonder if it will get added to Linux.