equal
deleted
inserted
replaced
323 |
323 |
324 // Touch memory pages that cover the memory range from start to end (exclusive) |
324 // Touch memory pages that cover the memory range from start to end (exclusive) |
325 // to make the OS back the memory range with actual memory. |
325 // to make the OS back the memory range with actual memory. |
326 // Current implementation may not touch the last page if unaligned addresses |
326 // Current implementation may not touch the last page if unaligned addresses |
327 // are passed. |
327 // are passed. |
328 static void pretouch_memory(char* start, char* end); |
328 static void pretouch_memory(void* start, void* end); |
329 |
329 |
330 enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX }; |
330 enum ProtType { MEM_PROT_NONE, MEM_PROT_READ, MEM_PROT_RW, MEM_PROT_RWX }; |
331 static bool protect_memory(char* addr, size_t bytes, ProtType prot, |
331 static bool protect_memory(char* addr, size_t bytes, ProtType prot, |
332 bool is_committed = true); |
332 bool is_committed = true); |
333 |
333 |