vm: cache: all allocations are now zero-initialised

This commit is contained in:
2026-02-21 23:18:09 +00:00
parent 77936e3511
commit 044b3688aa
2 changed files with 2 additions and 2 deletions

View File

@@ -50,8 +50,6 @@ struct object *object_create(struct object_type *type)
return NULL; return NULL;
} }
memset(obj_buf, 0x00, type->ob_size);
struct object *obj = (struct object *)((unsigned char *)obj_buf struct object *obj = (struct object *)((unsigned char *)obj_buf
+ type->ob_header_offset); + type->ob_header_offset);

View File

@@ -198,6 +198,8 @@ void *vm_cache_alloc(struct vm_cache *cache, enum vm_flags flags)
} }
spin_unlock_irqrestore(&cache->c_lock, irq_flags); spin_unlock_irqrestore(&cache->c_lock, irq_flags);
memset(p, 0x0, cache->c_obj_size);
return p; return p;
} }