GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- stress test virtual memory
Operating System - HP-UX
1845166
Members
2313
Online
110237
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
05-06-2005 05:53 AM
05-06-2005 05:53 AM
stress test virtual memory
Does any one have any ideas on how I can stress test the memory management system. I would like to allocate memory so that the system will start paging out. I will monitor memory usage while performing test. I am not a C programmer so if you have a piece of code please provide it if you will.
Thanks in advance!
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2005 06:43 AM
05-06-2005 06:43 AM
Re: stress test virtual memory
Any help would be much appreciated!
-tony
-tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2005 12:33 PM
05-06-2005 12:33 PM
Re: stress test virtual memory
Try the following program.
#include
int main()
{
int ret;
size_t datsiz = 2147483648;
size_t stsiz = 0;
ret = datalock(datsiz, stsiz);
if (ret == -1) {
perror("datalock");
exit(1);
}
for (;;) {
}
return 0;
}
Compile it with 'cc +DD64'. It should create a process with 2G data space (of course adjust this number based on how much memory you have on your system).
datalock() makes sure that memory is allocated and *used* (malloc() only allocates memory).
#include
int main()
{
int ret;
size_t datsiz = 2147483648;
size_t stsiz = 0;
ret = datalock(datsiz, stsiz);
if (ret == -1) {
perror("datalock");
exit(1);
}
for (;;) {
}
return 0;
}
Compile it with 'cc +DD64'. It should create a process with 2G data space (of course adjust this number based on how much memory you have on your system).
datalock() makes sure that memory is allocated and *used* (malloc() only allocates memory).
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP