expected_size is not an output parameter
This commit is contained in:
parent
8b033c5e44
commit
d35674c67e
4
malloc.c
4
malloc.c
@ -442,7 +442,7 @@ static void enqueue_free_slab(struct size_class *c, struct slab_metadata *metada
|
|||||||
c->free_slabs_tail = substitute;
|
c->free_slabs_tail = substitute;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void deallocate_small(void *p, size_t *expected_size) {
|
static inline void deallocate_small(void *p, const size_t *expected_size) {
|
||||||
size_t class = slab_size_class(p);
|
size_t class = slab_size_class(p);
|
||||||
|
|
||||||
struct size_class *c = &size_class_metadata[class];
|
struct size_class *c = &size_class_metadata[class];
|
||||||
@ -837,7 +837,7 @@ static void *allocate(size_t size) {
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void deallocate_large(void *p, size_t *expected_size) {
|
static void deallocate_large(void *p, const size_t *expected_size) {
|
||||||
enforce_init();
|
enforce_init();
|
||||||
|
|
||||||
mutex_lock(®ions_lock);
|
mutex_lock(®ions_lock);
|
||||||
|
Loading…
Reference in New Issue
Block a user