Open GoogleCodeExporter opened 9 years ago
There's some similar code in issue 100's patches.
There's also similar code to be found in old versions of iperf_api.c. The
first mmap version was 324, so this will get you the final malloc version:
hg cat -r 323 src/iperf_api.c
It does at least one thing this patch does not: page-align the buffer. So that
idea should be combined with the patch's conditional mmap/malloc.
Original comment by jef.posk...@gmail.com
on 13 Dec 2013 at 4:43
Actually, on second glance what the patch in issue 100 does is use /cache
instead of /tmp on Android. If that makes it possible to continue using mmap in
all cases then that is the simpler change and we don't need to resurrect the
malloc code.
Original comment by jef.posk...@gmail.com
on 13 Dec 2013 at 4:47
We would like to use a single binary for both Android and Linux, so having a
conditional compile flag for Android is not that good..
What about passing the location for the mmap'ed buffer as a parameter (while
keeping /tmp as default) ?
Also, I can rework the patch to page-align the buffer if you want.
Original comment by frode.is...@gmail.com
on 13 Dec 2013 at 4:54
Not needing to build a separate Android binary is a good goal, but --zerocopy
functioning on Android is even better.
Maybe there's some way to do a runtime test of whether to use /tmp or /cache.
Original comment by jef.posk...@gmail.com
on 13 Dec 2013 at 5:36
OK - if using /tmp fails, I will try using /cache. Is this OK or ??
Original comment by frode.is...@gmail.com
on 17 Dec 2013 at 1:13
Original comment by bltier...@es.net
on 18 Dec 2013 at 9:43
Included you will find a patch that will try different locations for the
temporary mmap'ed file. I have added /cache for Android, but you can easily add
other locations as well.
Original comment by frode.is...@gmail.com
on 17 Jan 2014 at 9:07
Attachments:
I use attached patch code to allow application defined directory at run time.
For my case is an iOS app.
Original comment by alvinc...@gmail.com
on 12 Mar 2014 at 6:45
Attachments:
Original issue reported on code.google.com by
frode.is...@gmail.com
on 27 Nov 2013 at 3:11Attachments: