projects
/
profile
/
ivi
/
pulseaudio-panda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd0e4ce
)
memtrap: implicitly page align memory areas
author
Lennart Poettering
<lennart@poettering.net>
Tue, 28 Apr 2009 23:53:28 +0000
(
01:53
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 28 Apr 2009 23:53:28 +0000
(
01:53
+0200)
src/pulsecore/memtrap.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/memtrap.c
b/src/pulsecore/memtrap.c
index
bd0243e
..
601fef4
100644
(file)
--- 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();