Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 10-11-2010, 06:11 AM   #1
LQ Newbie
Registered: Oct 2010
Posts: 1

Rep: Reputation: 0
In Linux2.6, why does malloc return high memory address(higher than 0x40000000) ?

Now I met a problem which confused me for some time. As we know, malloc will return heap memory by brk system call if I request little length memory. and will return high memory address by mmap system call if I request large memory.

But now in my program, even if I request few bytes memory, malloc will return high memory address (higher than 0x40000000). What causes this? glibc or linux kernel?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
C malloc and calloc always return null Valkyrie_of_valhalla Programming 1 04-12-2009 08:42 AM
ANSI C: force malloc to return address with specific range. Neuzen Programming 2 01-04-2009 04:14 PM
does two malloc statements return same address? hetzme Programming 5 08-16-2005 11:22 AM
why malloc() return different pointer value? hddd Programming 1 05-23-2005 04:38 AM
Help!?! RH 8 Memory Mapping -High Memory-Virtural Memory issues.. Merlin53 Linux - Hardware 2 06-18-2003 05:48 PM

All times are GMT -5. The time now is 04:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration