2 * Copyright (c) 2007, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
21 map_init(Map *m, int n)
23 m->size = (n + 7) >> 3;
24 m->map = m->size ? sat_calloc(m->size, 1) : 0;
31 m->map = sat_free(m->map);
35 /* copy constructor t <- s */
37 map_init_clone(Map *t, Map *s)
42 t->map = sat_malloc(s->size);
43 memcpy(t->map, s->map, s->size);
51 map_grow(Map *m, int n)
56 m->map = sat_realloc(m->map, n);
57 memset(m->map + m->size, 0, n - m->size);