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

#include <skalibs/stralloc.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 = stralloc_zero ;
  g->freelist = genalloc_zero ;
  g->esize = esize ;
  g->base = base ;
  g->fracnum = fracnum ;
  g->fracden = fracden ;
}