diff options
author | Simon Glass <sjg@chromium.org> | 2022-09-06 20:27:00 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-09-29 16:07:58 -0400 |
commit | 62d638386c17d17b929ad10956c7f60825335a4e (patch) | |
tree | 9f0e6f82f9bdc3fac8a8c64e2850c14002cd6a2a /arch/sandbox/include/asm/malloc.h | |
parent | 7c14dc7f77705f79ba49e7f0b2879986fea70fea (diff) |
test: Support testing malloc() failures
It is helpful to test that out-of-memory checks work correctly in code
that calls malloc().
Add a simple way to force failure after a given number of malloc() calls.
Fix a header guard to avoid a build error on sandbox_vpl.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Diffstat (limited to 'arch/sandbox/include/asm/malloc.h')
-rw-r--r-- | arch/sandbox/include/asm/malloc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/malloc.h b/arch/sandbox/include/asm/malloc.h index a1467b5ead..8aaaa9cb87 100644 --- a/arch/sandbox/include/asm/malloc.h +++ b/arch/sandbox/include/asm/malloc.h @@ -6,6 +6,7 @@ */ #ifndef __ASM_MALLOC_H +#define __ASM_MALLOC_H void *malloc(size_t size); void free(void *ptr); |