diff options
author | Maria Matejka <mq@ucw.cz> | 2022-09-09 20:57:59 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-09-18 16:33:51 +0200 |
commit | b80823fe828a0687d4baae3c34c737d46fbf439c (patch) | |
tree | 89833602bbe291778e3de42a939efe297e9ce084 /lib | |
parent | 3d627d09d4da3bdc1712bde67ba62c9cfbfcedc9 (diff) |
Memory pages allocator is now a global simple lockless structure
Diffstat (limited to 'lib')
-rw-r--r-- | lib/resource.c | 2 | ||||
-rw-r--r-- | lib/resource.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/resource.c b/lib/resource.c index 898fb533..2e367132 100644 --- a/lib/resource.c +++ b/lib/resource.c @@ -279,8 +279,8 @@ rlookup(unsigned long a) void resource_init(void) { - resource_sys_init(); rcu_init(); + resource_sys_init(); root_pool.r.class = &pool_class; root_pool.name = "Root"; diff --git a/lib/resource.h b/lib/resource.h index 5ad011ec..56a746bb 100644 --- a/lib/resource.h +++ b/lib/resource.h @@ -122,6 +122,7 @@ void buffer_realloc(void **buf, unsigned *size, unsigned need, unsigned item_siz /* Allocator of whole pages; for use in slabs and other high-level allocators. */ #define PAGE_HEAD(x) ((void *) (((uintptr_t) (x)) & ~(page_size-1))) extern long page_size; +extern _Atomic int pages_kept; void *alloc_page(void); void free_page(void *); |