[insert project logo here (125x200px max)]

Navigator

Mailinglists

Please report any errors or ommissions you find to our `Help' mailinglist, or post a message in the Forums.

Copyright and Licensing Information

Snap is (c) Jonathan T. Moore, 1999-2002 and licensed under the GNU General Public License (GPL).

All other parts of Splash are (c) Willem de Bruijn, 2002-2003 and licensed under the BSD Open Source License.

All sourcecode is made publicly available.

Acknowledgement

Splash and the Splash website are hosted by SourceForge.net

SourceForge.net Logo

osi-open source certified logo

Splash - Documentation

SNMP Plus a Lightweight API for SNAP Handling

Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

snap-1.1-wjdb/lib/memalloc.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "timers.h"

Include dependency graph for memalloc.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.


Defines

#define memalloc(ptr, t, sz)

Define Documentation

#define memalloc ptr,
t,
sz   
 

Value:

{ void *_result;                                                \
    print_anti_timer(12,"memalloc");                              \
    _result = (void *)malloc(sz);                                 \
    if (_result == NULL) {                                        \
      fprintf(stderr,"%s:%d: malloc failed\n",__FILE__,__LINE__); \
      fflush(stderr);                                             \
      exit(1);                                                    \
    }                                                             \
    bzero(_result,sz);                                            \
    (ptr) = (t)_result;                                           \
    print_timer(12,"memalloc");                                   \
}

Definition at line 32 of file memalloc.h.

Referenced by cons(), file_to_str(), ht_create(), ht_insert(), main(), marshal_packet(), parse_cmdline(), read_ifaces(), read_routes(), and yyparse().