cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Allocate at specific address
Allocate at specific address
May 15, 2012 at 9:57pm UTC
closed account (
o1vk4iN6
)
I know windows has VirtualAlloc() and was wondering what the unix equivalent is for use with android and iOS?
May 16, 2012 at 2:17am UTC
kbw
(9488)
You shouldn't think of VirtualAlloc as an allocator that allocates at a specific address (because it doesn't). You should think of it as the system allocator. The equivalent in Unix is malloc.
May 16, 2012 at 2:44am UTC
Cubbi
(4774)
I'd say mmap() with MAP_ANONYMOUS is a bit closer to VirtualAlloc() that malloc()
Last edited on
May 16, 2012 at 2:45am UTC
Topic archived. No new replies allowed.