diff options
author | Lennart Poettering <lennart@poettering.net> | 2009-04-29 01:53:28 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2009-04-29 01:53:28 +0200 |
commit | 4abd5fae1431d47398d3b007fdceac5fda7607a8 (patch) | |
tree | efff235c0d16694cab5de55aff32cabe500847db /src | |
parent | bd0e4ceb857f3e7891e0d5aeebaa6e2144986ccb (diff) |
memtrap: implicitly page align memory areas
Diffstat (limited to 'src')
-rw-r--r-- | src/pulsecore/memtrap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c index bd0243e0..601fef44 100644 --- a/src/pulsecore/memtrap.c +++ b/src/pulsecore/memtrap.c @@ -122,8 +122,9 @@ pa_memtrap* pa_memtrap_add(const void *start, size_t size) { pa_assert(start); pa_assert(size > 0); - pa_assert(PA_PAGE_ALIGN_PTR(start) == start); - pa_assert(PA_PAGE_ALIGN(size) == size); + + start = PA_PAGE_ALIGN_PTR(start); + size = PA_PAGE_ALIGN(size); m = pa_xnew(pa_memtrap, 1); m->start = (void*) start; @@ -164,8 +165,9 @@ pa_memtrap *pa_memtrap_update(pa_memtrap *m, const void *start, size_t size) { pa_assert(start); pa_assert(size > 0); - pa_assert(PA_PAGE_ALIGN_PTR(start) == start); - pa_assert(PA_PAGE_ALIGN(size) == size); + + start = PA_PAGE_ALIGN_PTR(start); + size = PA_PAGE_ALIGN(size); allocate_aupdate(); |