Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions user_malloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,15 @@ static void process_environ(const char *option_str)
&start_iter, &start_size, &_dmalloc_memory_limit);
thread_lock_c = _dmalloc_lock_on;

/* if we set the start stuff, then check-heap comes on later */
if (start_iter > 0 || start_size > 0) {
/*
* Tune the environment here. If we have a start-file,
* start-count, or interval enabled then make sure the check-heap
* flag is cleared.
*/
if (start_file != NULL
|| start_iter > 0
|| start_size > 0
|| _dmalloc_check_interval > 0) {
BIT_CLEAR(_dmalloc_flags, DMALLOC_DEBUG_CHECK_HEAP);
}

Expand Down Expand Up @@ -366,18 +373,6 @@ static int dmalloc_startup(const char *debug_str)
/* process the environmental variable(s) */
process_environ(env_str);

/*
* Tune the environment here. If we have a start-file,
* start-count, or interval enabled then make sure the check-heap
* flag is cleared.
*/
if (start_file != NULL
|| start_iter > 0
|| start_size > 0
|| _dmalloc_check_interval > 0) {
BIT_CLEAR(_dmalloc_flags, DMALLOC_DEBUG_CHECK_HEAP);
}

/* startup heap code */
if (! _dmalloc_heap_startup()) {
return 0;
Expand Down