summaryrefslogtreecommitdiff
path: root/src/libdatastruct/gensetdyn_init.c
blob: bdf4e09de9ac7b09fec6e68c55c5b21317a45a6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* ISC license. */

#include <stdint.h>
#include <skalibs/genalloc.h>
#include <skalibs/gensetdyn.h>

void gensetdyn_init (gensetdyn *g, uint32_t esize, uint32_t base, uint32_t fracnum, uint32_t fracden)
{
  g->storage.len = 0 ;
  genalloc_setlen(uint32_t, &g->freelist, 0) ;
  g->esize = esize ;
  g->base = base ;
  g->fracnum = fracnum ;
  g->fracden = fracden ;
}