- 30 Mar, 2002 10 commits
-
-
Jack Jansen authored
needs a decent commandline interface, though.
-
Tim Peters authored
address obtained from system malloc/realloc without holding the GIL. When the vector of arena base addresses has to grow, the old vector is deliberately leaked. This makes "stale" x-thread references safe. arenas and narenas are also declared volatile, and changed in an order that prevents a thread from picking up a value of narenas too large for the value of arenas it sees. Added more asserts. Fixed an old inaccurate comment. Added a comment explaining why it's safe to call pymalloc free/realloc with an address obtained from system malloc/realloc even when arenas is still NULL (this is obscure, since the ADDRESS_IN_RANGE macro appears <wink> to index into arenas).
-
Tim Peters authored
Else the pymalloc malloc will go insane the next time it's called.
-
Tim Peters authored
this. But added an overflow check just in case there is. Got rid of the ushort macro. It wasn't used anymore (it was only used in the no-longer-exists off_t macro), and there's no plausible use for it.
-
Tim Peters authored
-
Martin v. Löwis authored
-
Tim Peters authored
-
Tim Peters authored
waste the first pool if malloc happens to return a pool-aligned address. This means the number of pools per arena can now vary by 1. Unfortunately, the code counted up from 0 to a presumed constant number of pools. So changed the increasing "watermark" counter to a decreasing "nfreepools" counter instead, and fiddled various stuff accordingly. This also allowed getting rid of two more macros. Also changed the code to align the first address to a pool boundary instead of a page boundary. These are two parallel sets of macro #defines that happen to be identical now, but the page macros are in theory more restrictive (bigger), and there's simply no reason I can see that it wasn't aligning to the less restrictive pool size all along (the code only relies on pool alignment). Hmm. The "page size" macros aren't used for anything *except* defining the pool size macros, and the comments claim the latter isn't necessary. So this has the feel of a layer of indirection that doesn't serve a purpose; should probably get rid of the page macros now.
-
Tim Peters authored
are called without the GIL. It's incredibly unlikely to fail, but I can't make this bulletproof without either adding a lock for exclusion, or giving up on growing the arena base-address vector (it would be safe if this were a static array).
-
Tim Peters authored
+ A new scheme for determining whether an address belongs to a pymalloc arena. This should be 100% reliable. The poolp->pooladdr and poolp->magic members are gone. A new poolp->arenaindex member takes their place. Note that the pool header overhead doesn't actually shrink, though, since the header is padded to a multiple of 8 bytes. + _PyMalloc_Free and _PyMalloc_Realloc should now be safe to call for any legit address, whether obtained from a _PyMalloc function or from the system malloc/realloc. It should even be safe to call _PyMalloc_Free when *not* holding the GIL, provided that the passed-in address was obtained from system malloc/realloc. Since this is accomplished without any locks, you better believe the code is subtle. I hope it's sufficiently commented. + The above implies we don't need the new PyMalloc_{New, NewVar, Del} API anymore, and could switch back to PyObject_XXX without breaking existing code mixing PyObject_XXX with PyMem_{Del, DEL, Free, FREE}. Nothing is done here about that yet, and I'd like to see this new code exercised more first. + The small object threshhold is boosted to 256 (the max). We should play with that some more, but the old 64 was way too small for 2.3. + Getting a new arena is now done via new function new_arena(). + Removed some unused macros, and squashed out some macros that were used only once to define other macros. + Arenas are no longer linked together. A new vector of arena base addresses had to be created anyway to make address classification bulletproof. + A lot of the patch size is an illusion: given the way address classification works now, it was more convenient to switch the sense of the prime "if" tests in the realloc and free functions, so the "if" and "else" blocks got swapped. + Assorted minor code, comment and whitespace cleanup. Back to the Windows installer <wink>.
-
- 29 Mar, 2002 30 commits
-
-
Jack Jansen authored
-
Jack Jansen authored
BuildApplet for MachoPython now seems to do the right thing, yeah!
-
Jack Jansen authored
Also, for now (until we learn to parse .plist files) we make a special case for the IDE, setting the creator to "Pide".
-
Jack Jansen authored
-
Fred Drake authored
-
Fred Drake authored
There's still a long way to go, but we're starting to see some real content in the docs.
-
Jack Jansen authored
-
Just van Rossum authored
-
Just van Rossum authored
-
Jack Jansen authored
(if a single newline convention is used in the sourcefile), and the "save options" has a newline style radio button. The creator radio button also has the new choices PythonW and None. Just: just shout (and revert) if you don't agree.
-
Jack Jansen authored
Added a -D flag (can really only be specified on OSX commandline) to not revector sys.stderr, for debugging the IDE itself. Not sure whether this should stay.
-
Jack Jansen authored
enough that IDE and BuildApplet can create applets, yeah!
-
Jack Jansen authored
return None. For now, if the user asks for TEXT files files without type are also accepted. But it is time to phase out StandardGetFile and friends, really.
-
Jack Jansen authored
-
Jack Jansen authored
-
Jack Jansen authored
Changed version numbers and copyright.
-
Neil Schemenauer authored
-
Andrew M. Kuchling authored
the compiler
-
Martin v. Löwis authored
-
Andrew M. Kuchling authored
-
Andrew M. Kuchling authored
Walter Doerwald provided a patch, which I've modified in two ways: 1) (Uncontroversial) Removed code to make module work in earlier versions of Python without the unicode() built-in 2) (Poss. controversial) Instead of making string.zfill take the repr() of non-string objects, take the str(). Should a warning be added to this branch of the code so that the automatic str() can be deprecated? 2.2.2 bugfix candidate, assuming the repr()->str() change is deemed OK.
-
Andrew M. Kuchling authored
-
Jack Jansen authored
priority, for safety reasons.
-
Jack Jansen authored
datafork-based resource file before trying to decode it as AppleSingle.
-
Jack Jansen authored
-
Jack Jansen authored
python. Removed debug output.
-
Jack Jansen authored
/usr/local/bin (referring to the framework-based interpreter and Python.app). Added target symlinkmacsubtree to aid in debugging.
-
Jack Jansen authored
because of similarity to the same program on Windows.
-
Tim Peters authored
-
Neil Schemenauer authored
-