/[pspp]/pspp/src/pool.h
ViewVC logotype

Diff of /pspp/src/pool.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by blp, Sat Oct 29 23:35:55 2005 UTC revision 1.8 by blp, Thu Nov 3 06:21:46 2005 UTC
# Line 38  struct pool *pool_create (void); Line 38  struct pool *pool_create (void);
38  void pool_destroy (struct pool *);  void pool_destroy (struct pool *);
39  void pool_clear (struct pool *);  void pool_clear (struct pool *);
40    
41    /* Creates a pool, allocates an instance of the given STRUCT
42       within it, sets the struct's MEMBER to the pool's address, and
43       returns the allocated structure. */
44    #define pool_create_container(STRUCT, MEMBER)                           \
45            ((STRUCT *) pool_create_at_offset (sizeof (STRUCT),             \
46                                               offsetof (STRUCT, MEMBER)))
47    void *pool_create_at_offset (size_t struct_size, size_t pool_member_offset);
48    
49  /* Suballocation routines. */  /* Suballocation routines. */
50  void *pool_alloc (struct pool *, size_t) MALLOC_LIKE;  void *pool_alloc (struct pool *, size_t) MALLOC_LIKE;
51  void *pool_nalloc (struct pool *, size_t n, size_t s) MALLOC_LIKE;  void *pool_nalloc (struct pool *, size_t n, size_t s) MALLOC_LIKE;
# Line 56  void pool_free (struct pool *, void *); Line 64  void pool_free (struct pool *, void *);
64    
65  /* Gizmo allocations. */  /* Gizmo allocations. */
66  struct pool *pool_create_subpool (struct pool *);  struct pool *pool_create_subpool (struct pool *);
67    void pool_add_subpool (struct pool *, struct pool *subpool);
68  FILE *pool_fopen (struct pool *, const char *, const char *);  FILE *pool_fopen (struct pool *, const char *, const char *);
69  int pool_fclose (struct pool *, FILE *);  int pool_fclose (struct pool *, FILE *);
70    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26