mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
use valloc() on Darwin for GCHeap
This commit is contained in:
parent
7feb713f8b
commit
f1a775ac86
@ -83,9 +83,13 @@ public:
|
|||||||
inline void*
|
inline void*
|
||||||
Alloc(uint32_t pages)
|
Alloc(uint32_t pages)
|
||||||
{
|
{
|
||||||
|
#if defined DARWIN
|
||||||
|
return valloc(pages * kNativePageSize);
|
||||||
|
#else
|
||||||
void* p = malloc((pages + 1) * kNativePageSize);
|
void* p = malloc((pages + 1) * kNativePageSize);
|
||||||
p = (void*)(((int)(((char*)p) + kNativePageSize - 1)) & (~0xfff));
|
p = (void*)(((int)(((char*)p) + kNativePageSize - 1)) & (~0xfff));
|
||||||
return p;
|
return p;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
Loading…
Reference in New Issue
Block a user