projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'release-2.140.99'
[feisty_meow.git]
/
nucleus
/
library
/
application
/
memory_checker.cpp
diff --git
a/nucleus/library/application/memory_checker.cpp
b/nucleus/library/application/memory_checker.cpp
index 2426c7855a952a0d37ecd5558bd4b1e137711af9..2917b6db4adfe6ef840298bc6518fb2738f9e702 100644
(file)
--- a/
nucleus/library/application/memory_checker.cpp
+++ b/
nucleus/library/application/memory_checker.cpp
@@
-88,7
+88,7
@@
public:
#endif
void construct(void *ptr, int size, char *where, int line) {
#endif
void construct(void *ptr, int size, char *where, int line) {
- _next = N
IL
;
+ _next = N
ULL_POINTER
;
_chunk = ptr;
_size = size;
_where = strdup(where); // uses malloc, not new, so we're safe.
_chunk = ptr;
_size = size;
_where = strdup(where); // uses malloc, not new, so we're safe.
@@
-104,13
+104,13
@@
public:
}
void destruct() {
}
void destruct() {
- free(_chunk); _chunk = N
IL
;
- free(_where); _where = N
IL
;
- _next = N
IL
;
+ free(_chunk); _chunk = N
ULL_POINTER
;
+ free(_where); _where = N
ULL_POINTER
;
+ _next = N
ULL_POINTER
;
_size = 0;
_line = 0;
#ifdef ENABLE_CALLSTACK_TRACKING
_size = 0;
_line = 0;
#ifdef ENABLE_CALLSTACK_TRACKING
- free(_stack); _stack = N
IL
;
+ free(_stack); _stack = N
ULL_POINTER
;
#endif
}
};
#endif
}
};
@@
-140,7
+140,7
@@
class memory_bin
{
public:
void construct() {
{
public:
void construct() {
- _head = N
IL
;
+ _head = N
ULL_POINTER
;
_count = 0;
_lock = (mutex_base *)malloc(sizeof(mutex_base));
_lock->construct();
_count = 0;
_lock = (mutex_base *)malloc(sizeof(mutex_base));
_lock->construct();
@@
-169,7
+169,7
@@
public:
_lock->lock();
// search the bin to locate the item specified.
memlink *current = _head; // current will scoot through the list.
_lock->lock();
// search the bin to locate the item specified.
memlink *current = _head; // current will scoot through the list.
- memlink *previous = N
IL
; // previous remembers the parent node, if any.
+ memlink *previous = N
ULL_POINTER
; // previous remembers the parent node, if any.
while (current) {
if (current->_chunk == to_release) {
#ifdef MEMORY_CHECKER_STATISTICS
while (current) {
if (current->_chunk == to_release) {
#ifdef MEMORY_CHECKER_STATISTICS
@@
-256,7
+256,7
@@
public:
_bins[i].destruct();
}
free(_bins);
_bins[i].destruct();
}
free(_bins);
- _bins = N
IL
;
+ _bins = N
ULL_POINTER
;
}
int compute_slot(void *ptr) {
}
int compute_slot(void *ptr) {
@@
-317,7
+317,7
@@
public:
// this is fairly resource intensive, so don't dump the state out that often.
char *text_form(bool show_outstanding) {
// this is fairly resource intensive, so don't dump the state out that often.
char *text_form(bool show_outstanding) {
- char *to_return = N
IL
;
+ char *to_return = N
ULL_POINTER
;
if (show_outstanding) {
to_return = report_allocations();
} else {
if (show_outstanding) {
to_return = report_allocations();
} else {
@@
-382,7
+382,7
@@
if (!_mems) printf("memory_checker::destruct being invoked twice!\n");
_mems->destruct();
free(_mems);
_mems->destruct();
free(_mems);
- _mems = N
IL
;
+ _mems = N
ULL_POINTER
;
}
void *memory_checker::provide_memory(size_t size, char *file, int line)
}
void *memory_checker::provide_memory(size_t size, char *file, int line)