mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-20 08:56:47 -05:00
add some more comments
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@271 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
1f6a90c963
commit
344ced4622
3 changed files with 80 additions and 16 deletions
|
|
@ -30,19 +30,22 @@
|
|||
#include "memory.h"
|
||||
#include "util.h"
|
||||
|
||||
#define MAX_ALLOC_SIZE (1024*1024*20)
|
||||
/* Make sure not to allocate more than this much memory. */
|
||||
#define MAX_ALLOC_SIZE (1024*1024*20) /* 20MB */
|
||||
|
||||
#undef malloc
|
||||
#undef free
|
||||
#undef realloc
|
||||
#undef strndup
|
||||
#undef strdup
|
||||
/* #undef malloc */
|
||||
/* #undef free */
|
||||
/* #undef realloc */
|
||||
/* #undef strndup */
|
||||
/* #undef strdup */
|
||||
|
||||
/** called in case of an OOM situation. Prints an error message and
|
||||
* exits */
|
||||
static void oom(void) {
|
||||
static const char e[] = "Not enough memory\n";
|
||||
pa_loop_write(2, e, sizeof(e)-1);
|
||||
pa_loop_write(STDERR_FILENO, e, sizeof(e)-1);
|
||||
raise(SIGQUIT);
|
||||
exit(1);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
void* pa_xmalloc(size_t size) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue