* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
yaz_log (level, "nmem print list");
NMEM_ENTER;
for (p = nmem_debug_list; p; p = p->next)
yaz_log (level, "nmem print list");
NMEM_ENTER;
for (p = nmem_debug_list; p; p = p->next)
- yaz_log (level, " %s:%d p=%p size=%d", p->file, p->line, p->p,
- nmem_total(p->p));
+ yaz_log (level, " %s:%d p=%p size=%d", p->file, p->line, p->p,
+ nmem_total(p->p));
debug_p = xmalloc (sizeof(*debug_p));
strncpy (debug_p->file, file, sizeof(debug_p->file)-1);
debug_p->file[sizeof(debug_p->file)-1] = '\0';
debug_p = xmalloc (sizeof(*debug_p));
strncpy (debug_p->file, file, sizeof(debug_p->file)-1);
debug_p->file[sizeof(debug_p->file)-1] = '\0';
#if NMEM_DEBUG
yaz_log (log_level, "%s:%d: nmem_destroy %d p=%p", file, line,
nmem_active_no-1, n);
NMEM_ENTER;
for (debug_p = &nmem_debug_list; *debug_p; debug_p = &(*debug_p)->next)
#if NMEM_DEBUG
yaz_log (log_level, "%s:%d: nmem_destroy %d p=%p", file, line,
nmem_active_no-1, n);
NMEM_ENTER;
for (debug_p = &nmem_debug_list; *debug_p; debug_p = &(*debug_p)->next)
- if ((*debug_p)->p == n)
- {
- struct nmem_debug_info *debug_save = *debug_p;
- *debug_p = (*debug_p)->next;
- xfree (debug_save);
- ok = 1;
- break;
- }
+ if ((*debug_p)->p == n)
+ {
+ struct nmem_debug_info *debug_save = *debug_p;
+ *debug_p = (*debug_p)->next;
+ xfree (debug_save);
+ ok = 1;
+ break;
+ }
- while (freelist)
- {
- struct nmem_block *fl = freelist;
- freelist = freelist->next;
- xfree (fl->buf);
- xfree (fl);
- }
- while (cfreelist)
- {
- struct nmem_control *cfl = cfreelist;
- cfreelist = cfreelist->next;
- xfree (cfl);
- }
+ while (freelist)
+ {
+ struct nmem_block *fl = freelist;
+ freelist = freelist->next;
+ xfree (fl->buf);
+ xfree (fl);
+ }
+ while (cfreelist)
+ {
+ struct nmem_control *cfl = cfreelist;
+ cfreelist = cfreelist->next;
+ xfree (cfl);
+ }
- FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- err,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default lang */
- (LPTSTR) buf,
- max-1,
- NULL);
+ FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ err,
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), /* Default lang */
+ (LPTSTR) buf,
+ max-1,
+ NULL);