Next: , Up: ascii non-zero guarded   [Contents][Index]


7.1.6.1 Guarding memory allocated with malloc

Usage example:

cce_location_t        L[1];
ccmem_clean_handler_t S_H[1];

if (cce_location(L)) {
  cce_run_catch_handlers_raise(L, upper_L);
} else {
  ccmem_ascii_t  S = ccmem_ascii_malloc_guarded(L, S_H,
                       ccmem_standard_allocator, 4);

  ...
  cce_run_body_handlers(L);
}
Function: ccmem_ascii_t ccmem_ascii_malloc_guarded_clean (cce_destination_t L, ccmem_clean_handler_t * S_H, ccmem_allocator_t const * A, size_t len)

Adapter for ccmem_malloc_guarded_clean() that builds and returns a new ASCII string.

Function: ccmem_ascii_t ccmem_ascii_malloc_guarded_error (cce_destination_t L, ccmem_error_handler_t * S_H, ccmem_allocator_t const * A, size_t len)

Adapter for ccmem_malloc_guarded_error() that builds and returns a new ASCII string.

Preprocessor Macro: ccmem_ascii_t ccmem_ascii_malloc_guarded (cce_destination_t L, S_H, ccmem_allocator_t const * A, size_t len)

Preprocessor macro that builds and returns a new ASCII string. If the argument S_H is a pointer to:

ccmem_clean_handler_t

The macro use expands into a call to ccmem_ascii_malloc_guarded_clean().

ccmem_error_handler_t

The macro use expands into a call to ccmem_ascii_malloc_guarded_error().


Next: , Up: ascii non-zero guarded   [Contents][Index]

This document describes version 0.2.2-devel.3 of CCMemory.