parent
8179431272
commit
cd66f68dee
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: externs.h,v 1.15 2021/08/01 17:59:47 rillig Exp $ */
|
||||
/* $NetBSD: externs.h,v 1.16 2021/08/01 18:07:35 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Jochen Pohl
|
||||
|
@ -57,7 +57,6 @@ extern void *xmalloc(size_t);
|
|||
extern void *xcalloc(size_t, size_t);
|
||||
extern void *xrealloc(void *, size_t);
|
||||
extern char *xstrdup(const char *);
|
||||
extern void nomem(void);
|
||||
extern void xasprintf(char **, const char *, ...) __printflike(2, 3);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mem.c,v 1.13 2021/08/01 17:59:47 rillig Exp $ */
|
||||
/* $NetBSD: mem.c,v 1.14 2021/08/01 18:07:35 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Jochen Pohl
|
||||
|
@ -37,18 +37,22 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: mem.c,v 1.13 2021/08/01 17:59:47 rillig Exp $");
|
||||
__RCSID("$NetBSD: mem.c,v 1.14 2021/08/01 18:07:35 rillig Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/mman.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "lint.h"
|
||||
|
||||
static void __attribute__((noreturn))
|
||||
nomem(void)
|
||||
{
|
||||
|
||||
errx(1, "virtual memory exhausted");
|
||||
}
|
||||
|
||||
void *
|
||||
xmalloc(size_t s)
|
||||
{
|
||||
|
@ -92,13 +96,6 @@ xstrdup(const char *s)
|
|||
return s2;
|
||||
}
|
||||
|
||||
void __attribute__((noreturn))
|
||||
nomem(void)
|
||||
{
|
||||
|
||||
errx(1, "virtual memory exhausted");
|
||||
}
|
||||
|
||||
void
|
||||
xasprintf(char **buf, const char *fmt, ...)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mem1.c,v 1.46 2021/08/01 17:59:47 rillig Exp $ */
|
||||
/* $NetBSD: mem1.c,v 1.47 2021/08/01 18:07:35 rillig Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Jochen Pohl
|
||||
|
@ -37,7 +37,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID) && !defined(lint)
|
||||
__RCSID("$NetBSD: mem1.c,v 1.46 2021/08/01 17:59:47 rillig Exp $");
|
||||
__RCSID("$NetBSD: mem1.c,v 1.47 2021/08/01 18:07:35 rillig Exp $");
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -398,8 +398,8 @@ expr_save_memory(void)
|
|||
}
|
||||
|
||||
/*
|
||||
* Free all memory used for the current expression and the memory used
|
||||
* be a previous expression and saved by expr_save_memory(). The next call to
|
||||
* Free all memory used for the current expression and restore the memory used
|
||||
* by a previous expression and saved by expr_save_memory(). The next call to
|
||||
* expr_free_all() frees the restored memory.
|
||||
*/
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue