File: hdf_dealloc_test.c

package info (click to toggle)
clearsilver 0.10.5-1.3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 3,276 kB
  • sloc: ansic: 24,586; python: 4,233; sh: 2,502; cs: 1,429; ruby: 819; java: 735; makefile: 602; perl: 118; lisp: 34; sql: 21
file content (28 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28


#include "cs_config.h"
#include <unistd.h>
#include "util/neo_misc.h"
#include "util/neo_hdf.h"
#include "util/neo_rand.h"

int main(int argc, char *argv[])
{
  HDF *hdf = NULL;
  int i, j;

  hdf_init(&hdf);

  ne_warn("creating 100000x10 nodes");
  for (i = 0; i < 100000; i++) {
    char buffer[64];
    for (j = 0; j < 10; j++) {
      snprintf(buffer, sizeof(buffer), "node.%d.test.%d", i, j);
      hdf_set_value(hdf, buffer, "test");
    }
  }

  ne_warn("calling dealloc");
  hdf_destroy(&hdf);    // <-- this takes forever to return with a hugely
  return 0;
}