Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Richard Gobeille
EDuke32
Commits
5c200636
Commit
5c200636
authored
Apr 14, 2022
by
Richard Gobeille
Browse files
mimalloc: fix MinGW warnings...
parent
f2c02b46
Changes
1
Hide whitespace changes
Inline
Side-by-side
source/mimalloc/src/os.c
View file @
5c200636
...
...
@@ -373,9 +373,9 @@ static bool mi_os_mem_free(void* addr, size_t size, bool was_committed, mi_stats
// In mi_os_mem_alloc_aligned the fallback path may have returned a pointer inside
// the memory region returned by VirtualAlloc; in that case we need to free using
// the start of the region.
MEMORY_BASIC_INFORMATION
info
=
{
0
,
0
};
MEMORY_BASIC_INFORMATION
info
=
{
};
VirtualQuery
(
addr
,
&
info
,
sizeof
(
info
));
if
(
info
.
AllocationBase
<
addr
&&
((
uint8_t
*
)
addr
-
(
uint8_t
*
)
info
.
AllocationBase
)
<
MI_SEGMENT_SIZE
)
{
if
(
info
.
AllocationBase
<
addr
&&
((
uint8_t
*
)
addr
-
(
uint8_t
*
)
info
.
AllocationBase
)
<
(
unsigned
)
MI_SEGMENT_SIZE
)
{
errcode
=
0
;
err
=
(
VirtualFree
(
info
.
AllocationBase
,
0
,
MEM_RELEASE
)
==
0
);
if
(
err
)
{
errcode
=
GetLastError
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment