- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- memory allocation 32bit vs 64bit puzzle
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 08:14 AM
07-19-2004 08:14 AM
According to kmtune:
maxdsiz 0x80000000 - 0X80000000
maxdsiz_64bit 0x80000000 - 0X80000000
allocate_fs_swapmap 0 - 0
maxswapchunks 4096 - 4096
nswapdev 10 - 10
nswapfs 10 - 10
remote_nfs_swap 0 - 0
swapmem_on 1 - 1
swchunk 2048 - 2048
ulimit -Sa
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 392192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 512
cc -o memhog32 memhog.c
cc +DA2.0W -o memhog64 memhog.c
./memhog64 900000 1 20
total space 921600000
Allocated 0 chunk.
received signal
./memhog32 660000 1 20
total space 675840000
Allocation failed. Null pointer.: Not enough space
Note: I have executed this test repeatedly with the same result always.
./meminfo
Memory Stat total used avail %used
physical 2048.0 1216.8 831.2 59%
active virtual 2207.7 1753.9 453.9 79%
active real 455.5 350.8 104.7 77%
memory swap 1530.0 501.0 1029.0 33%
device swap 2048.0 1556.0 492.0 76%
On another machine 32 bit version works happily up to almost 1024M (as expected).
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 08:28 AM
07-19-2004 08:28 AM
Re: memory allocation 32bit vs 64bit puzzle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 09:44 AM
07-19-2004 09:44 AM
Re: memory allocation 32bit vs 64bit puzzle
Could you please clarify some points?
Why on the same machine 64 bit application allows to allocate more memory?
Since both allocations are significantly less than 1G (1 quadrant size) how come 32 bit application nature come into equasion?
Aren't 64 bit applications affected by fragmentation in the same way as 32 bit apps?
You mention 512M (worst case).
Would you have any pointers where I can read more about fragmentation and about this worst case?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 10:07 AM
07-19-2004 10:07 AM
Re: memory allocation 32bit vs 64bit puzzle
Even in the case where you must use 32-bit libraries, a good approach is to split your task so that it is mainly 64-bit and fork() and exec() a 32-bit child that communicates with the parent over IPC or pipes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2004 11:45 AM
07-19-2004 11:45 AM
Re: memory allocation 32bit vs 64bit puzzle
I have reviewed kernel params listed in my initial message and did not find anything.
Therefore I have created a small test application to simulate memory allocation.
At this moment I do not have a choice of changing the original packaged application but I'm requested to quantify/explain why this (32 bit) application cannot allocate even 700M total while on the same system 64 bit application can allocate 800M. Since both requests are way below 1G limit it is not at play here since requested memory is way lower.
Are there any other factors that account for difference of maximum memory that 32 and 64 bit applications can allocate (assume total requested space is under 800M)?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2004 01:43 AM
07-20-2004 01:43 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2004 03:40 AM
07-20-2004 03:40 AM
Re: memory allocation 32bit vs 64bit puzzle
You have hit it right in the head!
I'd give you 20 points if I could.