Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #25977 > unrolled thread

Re: How to deal with python 32bit memory error

Started byChristian Heimes <lists@cheimes.de>
First post2012-07-24 13:07 +0200
Last post2012-07-24 13:07 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How to deal with python 32bit memory error Christian Heimes <lists@cheimes.de> - 2012-07-24 13:07 +0200

#25977 — Re: How to deal with python 32bit memory error

FromChristian Heimes <lists@cheimes.de>
Date2012-07-24 13:07 +0200
SubjectRe: How to deal with python 32bit memory error
Message-ID<mailman.2528.1343128100.4697.python-list@python.org>
Am 24.07.2012 11:58, schrieb Dave Angel:
> There are some limitations to 32 bits, that have nothing to do with
> Python specifically.  However, they have different impact, depending on
> the environment you're running in.  First and foremost, address are
> 32bits, which limits them to 4gb of ram.  So out of your 32Gig of
> swapspace, a best-case maximum regardless of OS is 4Gig.  No operating
> system lets you actually get that high.

The usable amount of memory is much lower than 4 GB for a 32bit program.
A typical program can use about 2.4 to 2.7 GB virtual address space for
heap. The exact amount is hard to predicate as it depends on the
operating system, memory allocator and other settings. The rest of the 4
GB virtual address space is reserved for stack, mapping of dynamic
libraries and operating system routines.

The amount of usable memory on the heap (area returned by malloc()) is
often lowered by memory fragmentation. If your program tries to malloc
100 MB of memory but the largest contiguous area is just 98 MB you'll
get a memory error, too.

Christian

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web