Lines Matching refs:map
12 struct map {
16 struct map *next;
19 static struct map *maps;
21 static void setup_canary(struct map *map)
24 char *buf = map->addr;
26 for (i = 0; i < map->buf_shift/2; i++) {
28 buf[map->buf_shift - i - 1] = c;
33 static void check_canary(struct map *map)
36 char *buf = map->addr;
38 for (i = 0; i < map->buf_shift/2; i++) {
39 if (buf[map->buf_shift - i - 1] != buf[i]) {
42 getpid(), (char*)map->addr + map->buf_shift, -i-1);
52 struct map *map = SAFE_MALLOC(sizeof(struct map));
65 map->addr = ret;
66 map->size = pages * page_size;
67 map->next = maps;
68 maps = map;
71 map->buf_shift = page_size - (size % page_size);
73 map->buf_shift = 0;
75 setup_canary(map);
77 return ret + map->buf_shift;
154 struct map *i = maps;
157 struct map *j = i;