コード例 #1
0
ファイル: memory.c プロジェクト: antonywcl/AR-5315u_PLD
/* Memory free. */
void
zfree (int type, void *ptr)
{
#ifdef BRCM_RIP_DEBUG
  alloc_dec (type);
#endif
  free (ptr);
}
コード例 #2
0
ファイル: memory.c プロジェクト: Quagga/quagga
/*
 * Free memory allocated by z*alloc or zstrdup.
 * Requires: ptr was returned by zmalloc, zzcalloc, or zrealloc with the
 * same type.
 * Effects: The memory is freed and may no longer be referenced.
 */
void
zfree (int type, void *ptr)
{
  if (ptr != NULL)
    {
      alloc_dec (type);
      free (ptr);
    }
}
コード例 #3
0
ファイル: memory.c プロジェクト: millken/zhuxianB30
/* Memory free. */
void
zebra_free (int type, void *ptr)
{
    alloc_dec (type);
    if(debug_mem)
    {
        FILE *debug_fp = fopen(logfilename, "a");
        if(debug_fp)
            fprintf(debug_fp, "free memory at   : %p ,type: %s\n", ptr, typestr[type - 1]);
        fclose(debug_fp);
    }
    free (ptr);
}
コード例 #4
0
ファイル: memory.c プロジェクト: Jafaral/quagga-mtr
/*
 * Free memory allocated by z*alloc or zstrdup.
 * Requires: ptr was returned by zmalloc, zcalloc, or zrealloc with the
 * same type.
 * Effects: The memory is freed and may no longer be referenced.
 */
void
zfree (int type, void *ptr)
{
  alloc_dec (type);
  free (ptr);
}