• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/dbus-1.6.8/dbus/

Lines Matching defs:memory

2 /* dbus-memory.c  D-Bus memory handling
25 #include "dbus-memory.h"
37 * blocks of memory.
47 * of memory.
61 * allocate as arguments, and returns a memory block
66 * @returns the new memory block or #NULL on failure
74 * allocate as arguments, and returns a memory block
80 * @returns the new memory block or #NULL on failure
86 * The type of a function which frees a block of memory.
88 * @param memory the memory to free
155 _dbus_verbose ("Will disable memory pools\n");
244 * Called when about to alloc some memory; if
261 _dbus_verbose("TODO: memory allocation testing errors disabled for now\n");
390 /* set memory to anything but nul bytes */
451 * The memory must be released with dbus_free().
453 * dbus_malloc() memory is NOT safe to free with regular free() from
457 * @return allocated memory, or #NULL if the allocation fails.
488 _dbus_warn ("out of memory: malloc (%ld + %ld)\n",
508 _dbus_warn ("out of memory: malloc (%ld)\n", (long) bytes);
521 * allocation fails. The memory must be released with dbus_free().
523 * dbus_malloc0() memory is NOT safe to free with regular free() from
527 * @return allocated memory, or #NULL if the allocation fails.
560 _dbus_warn ("out of memory: calloc (%ld + %ld, 1)\n",
580 _dbus_warn ("out of memory: calloc (%ld)\n", (long) bytes);
590 * Resizes a block of memory previously allocated by dbus_malloc() or
591 * dbus_malloc0(). Guaranteed to free the memory and return #NULL if bytes
593 * If the resize fails, the memory is not freed.
595 * @param memory block to be resized
596 * @param bytes new size of the memory block
597 * @return allocated memory, or #NULL if the resize fails.
600 dbus_realloc (void *memory,
616 dbus_free (memory);
624 if (memory)
629 check_guards (memory, FALSE);
631 block = realloc (((unsigned char*)memory) - GUARD_START_OFFSET,
638 _dbus_warn ("out of memory: realloc (%p, %ld + %ld)\n",
639 memory, (long) bytes, (long) GUARD_EXTRA_SIZE);
665 _dbus_warn ("out of memory: malloc (%ld + %ld)\n",
677 mem = realloc (memory, bytes);
682 _dbus_warn ("out of memory: malloc (%ld)\n", (long) bytes);
686 if (memory == NULL && mem != NULL)
694 * Frees a block of memory previously allocated by dbus_malloc() or
697 * @param memory block to be freed
700 dbus_free (void *memory)
705 check_guards (memory, TRUE);
706 if (memory)
717 free (((unsigned char*)memory) - GUARD_START_OFFSET);
724 if (memory) /* we guarantee it's safe to free (NULL) */
737 free (memory);
806 * @returns #FALSE on not enough memory
842 * Frees all memory allocated internally by libdbus and
847 * dbus_shutdown() does NOT free memory that was returned
851 * You MUST free all memory and release all reference counts
861 * all D-Bus objects and memory before you call dbus_shutdown(), so no
865 * clean output from memory leak checkers. dbus_shutdown() may also be
917 _dbus_assert_not_reached ("no memory");
922 _dbus_assert_not_reached ("no memory");
928 _dbus_assert_not_reached ("no memory");