Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
90f31aa3
Commit
90f31aa3
authored
Jan 27, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Always enable tail checking when running under Valgrind.
parent
31aa3900
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
heap.c
dlls/ntdll/heap.c
+7
-5
No files found.
dlls/ntdll/heap.c
View file @
90f31aa3
...
...
@@ -29,6 +29,8 @@
#include <string.h>
#ifdef HAVE_VALGRIND_MEMCHECK_H
#include <valgrind/memcheck.h>
#else
#define RUNNING_ON_VALGRIND 0
#endif
#define NONAMELESSUNION
...
...
@@ -107,7 +109,7 @@ C_ASSERT( sizeof(ARENA_LARGE) % LARGE_ALIGNMENT == 0 );
/* minimum size to start allocating large blocks */
#define HEAP_MIN_LARGE_BLOCK_SIZE 0x7f000
/* extra size to add at the end of block for tail checking */
#define HEAP_TAIL_EXTRA_SIZE(flags)
(flags & HEAP_TAIL_CHECKING_ENABLE
D ? 8 : 0)
#define HEAP_TAIL_EXTRA_SIZE(flags)
((flags & HEAP_TAIL_CHECKING_ENABLED) || RUNNING_ON_VALGRIN
D ? 8 : 0)
/* Max size of the blocks on the free lists */
static
const
SIZE_T
HEAP_freeListSizes
[]
=
...
...
@@ -206,16 +208,16 @@ static inline void mark_block_uninitialized( void *ptr, SIZE_T size )
/* mark a block of memory as a tail block */
static
inline
void
mark_block_tail
(
void
*
ptr
,
SIZE_T
size
,
DWORD
flags
)
{
mark_block_uninitialized
(
ptr
,
size
);
if
(
flags
&
HEAP_TAIL_CHECKING_ENABLED
)
{
mark_block_uninitialized
(
ptr
,
size
);
memset
(
ptr
,
ARENA_TAIL_FILLER
,
size
);
}
#if defined(VALGRIND_MAKE_MEM_NOACCESS)
VALGRIND_DISCARD
(
VALGRIND_MAKE_MEM_NOACCESS
(
ptr
,
size
));
VALGRIND_DISCARD
(
VALGRIND_MAKE_MEM_NOACCESS
(
ptr
,
size
));
#elif defined( VALGRIND_MAKE_NOACCESS)
VALGRIND_DISCARD
(
VALGRIND_MAKE_NOACCESS
(
ptr
,
size
));
VALGRIND_DISCARD
(
VALGRIND_MAKE_NOACCESS
(
ptr
,
size
));
#endif
}
}
/* initialize contents of a newly created block of memory */
...
...
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