4
** Written by David Gerdes US Army Construction Engineering Research Lab
6
** Copyright 1992 USA-CERL All rights reserved.
11
** This is a simple worst case performance comparison between linkm and malloc
14
#include <grass/linkm.h>
26
int main(int argc, char *argv[])
30
struct link List, *tmp, *p;
37
/* link_set_chunk_size (2000); */
38
head = (VOID_T *) link_init(sizeof(struct link));
42
for (i = 0; i < 2000000; i++) {
44
p = (struct link *)link_new(head);
46
p = (struct link *)malloc(sizeof(struct link));
53
for (p = List.next; p != NULL;) {
56
link_dispose(head, p);