LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-01-2014, 05:42 AM   #16
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,836

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308

I found this in the man page of syscalls(2)
Quote:
The select(2) and mmap(2) system calls use five or more arguments, which caused problems in the way argument passing on the i386 used to be set up. Thus, while other architectures have sys_select() and sys_mmap() corresponding to __NR_select and __NR_mmap, on i386 one finds old_select() and old_mmap() (routines that use a pointer to a argument block) instead. These days passing five arguments is not a problem any more, and there is a __NR__newselect that corresponds directly to sys_select() and similarly __NR_mmap2.
Based on that it looks like old_mmap should not be used, but I'm not really familiar with it.
 
Old 08-01-2014, 08:53 AM   #17
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
I think my answer in one of the OP's other threads completely explains the situation:

http://www.linuxquestions.org/questi...6/#post5213152
 
Old 08-01-2014, 09:37 AM   #18
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
It may be the case that you will need to write your own "wrapper" around the memory-allocation areas of your program, to keep their own approximate count of how much memory they're requesting vs. the limitation that you wish to set. If they discover that they've exceeded their own quota, they basically kill themselves.

The problem with any "SOS = Short On Storage" situation is that it takes storage with which to sound the alarm.

Would a facility such as "ulimit" be applicable here?
 
  


Reply



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
Dynamic memory allocation using new operator hangs ArunkumarRavi Linux - Newbie 9 07-28-2014 05:50 AM
[SOLVED] dynamic memory allocation in assembly hda7 Linux - Software 9 10-28-2009 08:25 AM
Dynamic Memory Allocation jvff Programming 1 09-05-2005 05:01 AM
pointers and dynamic memory allocation deveraux83 Programming 2 01-24-2004 10:35 AM
Dynamic Memory Allocation query dhanakom Programming 2 07-21-2003 02:19 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:25 AM.

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