mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 03:27:39 +00:00
464858dbb4
This fixes a regression in mmap(MAP_FIXED) on Windows caused by a recent revision. This change also fixes ZipOS so it no longer needs a MAP_FIXED mapping to open files from the PKZIP store. The memory mapping mutex was implemented incorrectly earlier which meant that ftrace and strace could cause cause crashes. This lock and other recursive mutexes are rewritten so that it should be provable that recursive mutexes in cosmopolitan are asynchronous signal safe.
18 lines
627 B
C
18 lines
627 B
C
#ifndef COSMOPOLITAN_LIBC_RUNTIME_MEMTRACK_H_
|
|
#define COSMOPOLITAN_LIBC_RUNTIME_MEMTRACK_H_
|
|
COSMOPOLITAN_C_START_
|
|
|
|
#ifndef __SANITIZE_ADDRESS__
|
|
#define kFixedmapStart 0x300000000
|
|
#define kFixedmapSize (0x400000000 - kFixedmapStart)
|
|
#define kMemtrackFdsStart 0x6fe000000
|
|
#define kMemtrackFdsSize (0x6ff000000 - kMemtrackFdsStart)
|
|
#else
|
|
#define kFixedmapStart 0x300000040000
|
|
#define kFixedmapSize (0x400000040000 - kFixedmapStart)
|
|
#define kMemtrackFdsStart 0x6fe000040000
|
|
#define kMemtrackFdsSize (0x6feffffc0000 - kMemtrackFdsStart)
|
|
#endif
|
|
|
|
COSMOPOLITAN_C_END_
|
|
#endif /* COSMOPOLITAN_LIBC_RUNTIME_MEMTRACK_H_ */
|