vm: cache: all allocations are now zero-initialised
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user