pool.c: name becomes char array instead of pointer

This commit is contained in:
2021-12-20 15:10:17 +01:00
parent 118d7f8452
commit 90303eb8b5
2 changed files with 5 additions and 3 deletions

View File

@@ -19,13 +19,15 @@
#include "list.h"
#include "bits.h"
#define POOL_NAME_LENGTH (16) /* max name length including trailing \0 */
typedef struct {
struct list_head list_blocks; /* list of allocated blocks in pool */
char data[]; /* objects block */
} block_t;
typedef struct {
char *name; /* pool name */
char name[POOL_NAME_LENGTH]; /* pool name */
u32 available; /* current available elements */
u32 allocated; /* total objects allocated */
u32 growsize; /* number of objects per block allocated */