bonefish+mmlr:
Move blocking the 0xcccccccc and 0xdeadbeef address ranges from heap to VM init so that it also works when used in the slab allocator. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43047 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
72156a402f
commit
ffb6929a3b
@ -2137,15 +2137,6 @@ heap_init_post_area()
|
||||
status_t
|
||||
heap_init_post_sem()
|
||||
{
|
||||
#if PARANOID_KERNEL_MALLOC
|
||||
vm_block_address_range("uninitialized heap memory",
|
||||
(void *)ROUNDDOWN(0xcccccccc, B_PAGE_SIZE), B_PAGE_SIZE * 64);
|
||||
#endif
|
||||
#if PARANOID_KERNEL_FREE
|
||||
vm_block_address_range("freed heap memory",
|
||||
(void *)ROUNDDOWN(0xdeadbeef, B_PAGE_SIZE), B_PAGE_SIZE * 64);
|
||||
#endif
|
||||
|
||||
sHeapGrowSem = create_sem(0, "heap_grow_sem");
|
||||
if (sHeapGrowSem < 0) {
|
||||
panic("heap_init_post_sem(): failed to create heap grow sem\n");
|
||||
|
@ -3739,6 +3739,15 @@ vm_init(kernel_args* args)
|
||||
void* lastPage = (void*)ROUNDDOWN(~(addr_t)0, B_PAGE_SIZE);
|
||||
vm_block_address_range("overflow protection", lastPage, B_PAGE_SIZE);
|
||||
|
||||
#if PARANOID_KERNEL_MALLOC
|
||||
vm_block_address_range("uninitialized heap memory",
|
||||
(void *)ROUNDDOWN(0xcccccccc, B_PAGE_SIZE), B_PAGE_SIZE * 64);
|
||||
#endif
|
||||
#if PARANOID_KERNEL_FREE
|
||||
vm_block_address_range("freed heap memory",
|
||||
(void *)ROUNDDOWN(0xdeadbeef, B_PAGE_SIZE), B_PAGE_SIZE * 64);
|
||||
#endif
|
||||
|
||||
// create the object cache for the page mappings
|
||||
gPageMappingsObjectCache = create_object_cache_etc("page mappings",
|
||||
sizeof(vm_page_mapping), 0, 0, 64, 128, CACHE_LARGE_SLAB, NULL, NULL,
|
||||
|
Loading…
Reference in New Issue
Block a user