I'm running a Python job on OS X 10.5.3 and the Python 2.5.2 that's available as a binary download at python.org for OS X.
I ran a python program tonight that ended up using much more memory than anticipated. It just kept on using more and more memory. Instead of killing it, I just watched it, using Activity Monitor. I assumed that when it had 2GB allocated it would blow up, because I thought 32-bit python could only address 2GB.
But Activity Monitor reported that it had allocated 3.99GB of virtual memory before it finally blew up with malloc errors. Was my understanding of a 2GB limit wrong? I guess so! But I'm pretty sure I saw it max out at 2GB on linux...
Anybody have an explanation, or is it just that my understanding of a 2GB limit was wrong? Or was it perhaps right for earlier versions, or on linux...??
Thanks for any thoughts,
Gary
--
Gary Robinson
CTO
Emergent Music, LLC
personal email: ga*****@mac.com
work email: gr*******@emerg entmusic.com
Company: http://www.emergentmusic.com
Blog: http://www.garyrobinson.net 2 4752
Gary Robinson wrote:
I'm running a Python job on OS X 10.5.3 and the Python 2.5.2 that's available as a binary download at python.org for OS X.
I ran a python program tonight that ended up using much more memory than anticipated. It just kept on using more and more memory. Instead of killing it, I just watched it, using Activity Monitor. I assumed that when it had 2GB allocated it would blow up, because I thought 32-bit python could only address 2GB.
But Activity Monitor reported that it had allocated 3.99GB of virtual memory before it finally blew up with malloc errors. Was my understanding of a 2GB limit wrong? I guess so! But I'm pretty sure I saw it max out at 2GB on linux...
Anybody have an explanation, or is it just that my understanding of a 2GB limit was wrong? Or was it perhaps right for earlier versions, or on linux...??
Thanks for any thoughts,
Gary
Yep, 2Gb is only 31 bits. 4Gb is 32 bits (since memory address is an unsigned).
-Larry
On 2008-06-24, Gary Robinson <ga*****@mac.co mwrote:
I'm running a Python job on OS X 10.5.3 and the Python 2.5.2
that's available as a binary download at python.org for OS X.
I ran a python program tonight that ended up using much more
memory than anticipated. It just kept on using more and more
memory. Instead of killing it, I just watched it, using
Activity Monitor. I assumed that when it had 2GB allocated it
would blow up, because I thought 32-bit python could only
address 2GB.
You assumed incorrectly. :)
But Activity Monitor reported that it had allocated 3.99GB of
virtual memory before it finally blew up with malloc errors.
Was my understanding of a 2GB limit wrong? I guess so! But I'm
pretty sure I saw it max out at 2GB on linux...
You may have been using a Linux kernel with a 2GB user VM
limit.
Anybody have an explanation, or is it just that my
understanding of a 2GB limit was wrong? Or was it perhaps
right for earlier versions, or on linux...??
In the past, it was pretty common for Linux kernels to be
configured so that a user-space program had 2GB of virtual
address space. For reasons that aren't really important here,
doing so made it simpler to manage various kernel vs. user
memory issues. Back when nobody could afford more than a few
hundred MB of RAM, that made sense. These days, the Linux
kernel can be built for 2GB, 3GB or 4GB of VM space. There's a
tiny bit of extra overhead if you pick 3GB or 4GB, so users
with 2GB or less of physical RAM still often configure kernels
for a 2GB limit. http://kerneltrap.org/node/2450
--
Grant Edwards grante Yow! Can you MAIL a BEAN
at CAKE?
visi.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike Ruskai |
last post by:
I've searched Google every way I know how, and came up with two answers that
refer to MAX_KEY and MI_MAX_KEY, along with a typedef for key_map.
I have the 4.1.1 alpha source (4.0 is no good, because it doesn't support
subqueries).
I changed the two defines in sql/mysql_priv.h and include/myisam.h,
respectively. The typedef for key_map is no longer ulong or ulonglong, but
instead Bitmap(64);
|
by: Ivar |
last post by:
Hi,
For my supprise I found that functions have 32 parameter limit.
Where to find more info about this limitation or similar limitations ?
I need at least 50, 100 would be ok.
Real life function below:
|
by: Ian Rutherford |
last post by:
Heya guys,
It seems VB .net no longer supports the awesome ability of VB 6 to declare
something as a string and specify how long the string would be all in one
line:
Public myString as String * 32 'this would make it 32 characters long
Apparently the VB .net conversion is to do this:
Public myString as String
myString = new String(CChar(" "), 32) 'this creates a string with
32 blank spots in it
|
by: barcaroller |
last post by:
I couldn't find a message-digest newsgroup, so I posted here. I have a C
function that converts a string of arbitrary length to a 32-bit hash value.
I realize this is overkill but I used OpenSSL's sha1() to convert the string
to a SHA-1 160-bit message digest.
The question is: how do I use these 160 bits to get my final 32 bits?
Should I use the first 32 bits or the last 32 bits or is there yet another
method?
Note: I understand...
|
by: beni.cherniavsky |
last post by:
Python seems to be missing a UCS-32 codec, even in wide builds (not
that it the build should matter).
Is there some deep reason or should I just contribute a patch?
If it's just a bug, should I call the codec 'ucs-32' or 'utf-32'? Or
both (aliased)?
There should be '-le' and '-be' variats, I suppose. Should there be a
variant without explicit endianity, using a BOM to decide (like
'utf-16')?
And it should combine surrogates into...
| |
by: chandanlinster |
last post by:
As far as I know floating point variables, that are declared as float
follow IEEE format representation (which is 32-bit in size). But
chapter1-page no 9 of the book "The C programming language" states that
"THE RANGE OF BOTH int AND float DEPENDS ON THE MACHINE YOU ARE
USING".
Does this mean "float" variables have different sizes on different
machines?
|
by: lesperancer |
last post by:
you start with a small application in access97, then you have more
modules and more...
and you reach the point where tables like 'item' and 'employee' reach
the limit and you
know there's more indexes required for RI to come
does creating a RI programatically instead of the relationship window
still consume one of the 32 indexes ?
does access2000 / 2003 allow more indexes per table ?
|
by: Barry |
last post by:
void func(int array) {
for (int i = 0; i < 32; ++i)
cout << array << ' ';
}
as the code above shows, I know int array here will decay into int
*, but I still find the number 32 useful for reminding me the array len
Is this code standard confirmed?
|
by: Jeffrey Walton |
last post by:
Hi All,
BMP Strings are a subset of Universal Strings.The BMP string uses
approximately 65,000 code points from Universal String encoding. BMP
Strings: ISO/IEC 10646, 2-octet canonical form, Universal String: ISO/
IEC 10646, 4-octet canonical form.
An excellent discussion occured with respect to BMP Strings and .Net
(see http://groups.google.com/group/microsoft.public.dotnet.languages.csharp/browse_thread/thread/f18fcb62156a1a0c/)....
|
by: docbook.xml |
last post by:
I have the following in the XHTML 1.0 Strict page:
<meta http-equiv="Content-Type" content="text/html;charset=utf-32" />
However W3 validator complains that
"The character encoding specified in the HTTP header (utf-8) is
different from the value in the <metaelement (utf-32). I will use
the value from the HTTP header (utf-8) for this validation."
How can I change the encoding in the header? I don't have access to
change the HTTP server...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |