TO RESET: physical memory: free memory consistency checker
Change-Id: I15aa59bb81be4d8f2acfe8d161c8255f70f9e7d3
This commit is contained in:
committed by
Masamichi Takagi
parent
b268c28e7e
commit
10b17e230c
@@ -332,6 +332,23 @@ int deferred_zero_at_free = 1;
|
|||||||
* of their corresponding memory (i.e., they are on the free memory chunk itself).
|
* of their corresponding memory (i.e., they are on the free memory chunk itself).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef ENABLE_FUGAKU_HACKS
|
||||||
|
size_t __count_free_bytes(struct rb_root *root)
|
||||||
|
{
|
||||||
|
struct free_chunk *chunk;
|
||||||
|
struct rb_node *node;
|
||||||
|
size_t size = 0;
|
||||||
|
|
||||||
|
for (node = rb_first(root); node; node = rb_next(node)) {
|
||||||
|
chunk = container_of(node, struct free_chunk, node);
|
||||||
|
|
||||||
|
size += chunk->size;
|
||||||
|
}
|
||||||
|
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Free pages.
|
* Free pages.
|
||||||
* NOTE: locking must be managed by the caller.
|
* NOTE: locking must be managed by the caller.
|
||||||
|
|||||||
Reference in New Issue
Block a user