summaryrefslogtreecommitdiffstats
path: root/sys/vm/memguard.h
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2010-08-31 16:57:58 +0000
committermdf <mdf@FreeBSD.org>2010-08-31 16:57:58 +0000
commit42170bf6d6b1aa24e8b524672f3bbaf280e7e7c9 (patch)
tree52db48d2d45957d087b493ecb0f31698ab2834fd /sys/vm/memguard.h
parent655a96888d55c63b6496de2c02332278739d62f6 (diff)
downloadFreeBSD-src-42170bf6d6b1aa24e8b524672f3bbaf280e7e7c9.zip
FreeBSD-src-42170bf6d6b1aa24e8b524672f3bbaf280e7e7c9.tar.gz
The realloc case for memguard(9) will copy too many bytes when
reallocating to a smaller-sized allocation. Fix this issue. Noticed by: alc Reviewed by: alc Approved by: zml (mentor) MFC after: 3 weeks
Diffstat (limited to 'sys/vm/memguard.h')
-rw-r--r--sys/vm/memguard.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/memguard.h b/sys/vm/memguard.h
index ba7c2f1..25238b4 100644
--- a/sys/vm/memguard.h
+++ b/sys/vm/memguard.h
@@ -38,6 +38,7 @@ struct vm_map;
unsigned long memguard_fudge(unsigned long, unsigned long);
void memguard_init(struct vm_map *);
void *memguard_alloc(unsigned long, int);
+void *memguard_realloc(void *, unsigned long, struct malloc_type *, int);
void memguard_free(void *);
int memguard_cmp(struct malloc_type *, unsigned long);
int is_memguard_addr(void *);
@@ -45,6 +46,7 @@ int is_memguard_addr(void *);
#define memguard_fudge(size, xxx) (size)
#define memguard_init(map) do { } while (0)
#define memguard_alloc(size, flags) NULL
+#define memguard_realloc(a, s, mtp, f) NULL
#define memguard_free(addr) do { } while (0)
#define memguard_cmp(mtp, size) 0
#define is_memguard_addr(addr) 0
OpenPOWER on IntegriCloud