Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 // Common/Alloc.h
3 #ifndef __COMMON_ALLOC_H
4 #define __COMMON_ALLOC_H
6 #include <stddef.h>
8 void *MyAlloc(size_t size) throw();
9 void MyFree(void *address) throw();
11 #ifdef _WIN32
13 bool SetLargePageSize();
15 void *MidAlloc(size_t size) throw();
16 void MidFree(void *address) throw();
17 void *BigAlloc(size_t size) throw();
18 void BigFree(void *address) throw();
20 #else
22 #define MidAlloc(size) MyAlloc(size)
23 #define MidFree(address) MyFree(address)
24 #define BigAlloc(size) MyAlloc(size)
25 #define BigFree(address) MyFree(address)
27 #endif
29 #endif