Merge commit 'de5d652373
' into sync_cg_clif-2024-04-23
This commit is contained in:
commit
3d682cfb66
23 changed files with 189 additions and 195 deletions
|
@ -80,7 +80,6 @@ mod platform {
|
|||
extern "system" {
|
||||
fn GetProcessHeap() -> HANDLE;
|
||||
fn HeapAlloc(hHeap: HANDLE, dwFlags: DWORD, dwBytes: SIZE_T) -> LPVOID;
|
||||
fn HeapReAlloc(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID, dwBytes: SIZE_T) -> LPVOID;
|
||||
fn HeapFree(hHeap: HANDLE, dwFlags: DWORD, lpMem: LPVOID) -> BOOL;
|
||||
fn GetLastError() -> DWORD;
|
||||
}
|
||||
|
@ -111,7 +110,7 @@ mod platform {
|
|||
allocate_with_flags(layout, HEAP_ZERO_MEMORY)
|
||||
}
|
||||
#[inline]
|
||||
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
|
||||
unsafe fn dealloc(&self, ptr: *mut u8, _layout: Layout) {
|
||||
let header = get_header(ptr);
|
||||
let err = HeapFree(GetProcessHeap(), 0, header.0 as LPVOID);
|
||||
debug_assert!(err != 0, "Failed to free heap memory: {}", GetLastError());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue