summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* New PYMALLOC_DEBUG function void _PyMalloc_DebugDumpStats(void).Tim Peters2002-04-012-1/+98
| | | | | | | | | | | | | This displays stats about the # of arenas, pools, blocks and bytes, to stderr, both used and reserved but unused. CAUTION: Because PYMALLOC_DEBUG is on, the debug malloc routine adds 16 bytes to each request. This makes each block appear two size classes higher than it would be if PYMALLOC_DEBUG weren't on. So far, playing with this confirms the obvious: there's a lot of activity in the "small dict" size class, but nothing in the core makes any use of the 8-byte or 16-byte classes.
* We expect to skip the new test_mpz on Windows.Tim Peters2002-04-011-1/+5
|
* Use the PyModule_*() API instead of manipulating the module dictionaryFred Drake2002-04-012-11/+11
| | | | directly.
* Get rid of another use of PyArg_Parse()Neal Norwitz2002-04-011-2/+2
|
* Get rid of all METH_OLDARGS & PyArg_Parse.Neal Norwitz2002-04-012-43/+125
| | | | | Fix floating point exception if mpz.powm(10, 1, 0) (modulus == 0). Add a test.
* Remove some now-obsolete generator future statements.Tim Peters2002-04-016-19/+5
| | | | | I left the email pkg alone; I'm not sure how Barry would like to handle that.
* Convert file.readinto() to stop using METH_OLDARGS & PyArg_Parse.Neal Norwitz2002-04-012-2/+17
| | | | Add test for file.readinto().
* Hopeful fix for SF bug 503031: urllib.py: open_http() host problem.Guido van Rossum2002-03-311-1/+5
| | | | | | | I really can't test this, but from reading the discussion in that bug report, it's likely that this works. It may also close a whole bunch of other bug reports related to urllib and proxies on Windows, but who knows.
* mpz_float() only takes one parameter nowNeal Norwitz2002-03-311-5/+0
|
* Added a "run with commandline Python" flag. Works in MachoPython, should workJack Jansen2002-03-311-12/+54
| | | | | in OSX MacPython (untested), and should be disabled/removed in OS9 (but that doesn't happen yet).
* Get rid of warnings due to changing to METH_NOARGSNeal Norwitz2002-03-311-5/+5
|
* Use METH_VARARGS rather than METH_OLDARGS implicitly (args are ignored)Neal Norwitz2002-03-311-1/+1
|
* Convert METH_OLDARGS -> METH_NOARGS: remove args parameterNeal Norwitz2002-03-311-243/+247
| | | | Use METH_OLDARGS explicitly rather than implicitly.
* Revert use of METH_OLDARGS (use 0) to support 1.5.2Neal Norwitz2002-03-311-2/+4
|
* Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTupleNeal Norwitz2002-03-313-47/+34
| | | | Please review for correctness.
* Remove METH_OLDARGS:Neal Norwitz2002-03-3111-164/+85
| | | | | | | Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple Convert METH_OLDARGS -> METH_NOARGS: remove args parameter Please review. All tests pass, but some modules don't have tests. I spot checked various functions to try to make sure nothing broke.
* Convert from using METH_OLDARGS to METH_NOARGS.Neal Norwitz2002-03-313-85/+44
| | | | These should be safe.
* Fix whitespaceNeal Norwitz2002-03-311-2/+1
|
* Use symbolic METH_VARARGS/METH_OLDARGS instead of 1/0 for ml_flagsNeal Norwitz2002-03-313-17/+17
|
* Use symbolic METH_VARARGS instead of 1 for ml_flagsNeal Norwitz2002-03-315-51/+51
|
* Use docstrings for exception classesNeal Norwitz2002-03-312-2/+4
|
* Derive exception classes from ExceptionNeal Norwitz2002-03-312-2/+2
|
* Stop using string exceptionsNeal Norwitz2002-03-312-2/+2
|
* Add one more assert that indirectly interlocking conditions are consistentTim Peters2002-03-311-0/+1
| | | | with each other.
* Fixed an error in a new assert.Tim Peters2002-03-311-1/+1
|
* Fixed a typo in a new comment.Tim Peters2002-03-311-1/+1
|
* _PyMalloc_Free(): As was already done for _PyMalloc_Malloc, rearrangedTim Peters2002-03-311-37/+47
| | | | | | | | | | the code so that the most frequent cases come first. Added comments. Found a hidden assumption that a pool contains room for at least two blocks, and added an assert to catch a violation if it ever happens in a place where that matters. Gave the normal "I allocated this block" case a longer basic block to work with before it has to do its first branch (via breaking apart an embedded assignment in an "if", and hoisting common code out of both branches).
* Added a long-overdue comment block giving an overview of pool operationsTim Peters2002-03-311-3/+60
| | | | and terminology, plus explanation of some extreme obscurities.
* Suite to talk to the OSX Terminal application.Jack Jansen2002-03-302-0/+345
|
* Got rid of obsolete way to get at various toolbox types.Jack Jansen2002-03-301-5/+3
|
* Add Mac/Lib/lib-scriptpackages to sys.path too.Jack Jansen2002-03-301-2/+4
|
* Modified to allow it to run in MachoPython in a reasonable way. It stillJack Jansen2002-03-301-10/+17
| | | | needs a decent commandline interface, though.
* It's once again thought safe to call the pymalloc free/realloc with anTim Peters2002-03-301-14/+27
| | | | | | | | | | | | | | | | | | | 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).
* new_arena(): In error cases, reset the number of available pools to 0.Tim Peters2002-03-301-0/+1
| | | | Else the pymalloc malloc will go insane the next time it's called.
* Changed the #-of-arenas counters to uints -- no need to be insane aboutTim Peters2002-03-301-10/+11
| | | | | | | 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.
* Eliminate DONT_SHARE_SHORT_STRINGS.Tim Peters2002-03-302-15/+5
|
* Patch #536908: Add missing #include guards/extern "C".Martin v. Löwis2002-03-303-0/+26
|
* Turns out the off_t macro isn't used anymore, so got rid of it.Tim Peters2002-03-301-3/+0
|
* Now that we're no longer linking arenas together, there's no need toTim Peters2002-03-301-25/+21
| | | | | | | | | | | | | | | | | | | | | | 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.
* Retract the claim that this is always safe if PyMem_{Del, DEL, Free, FREE}Tim Peters2002-03-301-0/+4
| | | | | | | 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).
* Lots of changes:Tim Peters2002-03-301-127/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + 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>.
* Auxiliary files used by BuildApplet for MachoPython.Jack Jansen2002-03-293-0/+52
|
* Auxiliary files for building the IDE applet. Running the IDE throughJack Jansen2002-03-292-0/+57
| | | | BuildApplet for MachoPython now seems to do the right thing, yeah!
* Handle .icns and .plist files for applets.Jack Jansen2002-03-291-5/+23
| | | | | Also, for now (until we learn to parse .plist files) we make a special case for the IDE, setting the creator to "Pide".
* Missed one version number.Jack Jansen2002-03-291-1/+1
|
* Use the right types for a couple of fields of the type structure.Fred Drake2002-03-291-2/+2
|
* Started updating information about defining attributes on types.Fred Drake2002-03-291-7/+171
| | | | | There's still a long way to go, but we're starting to see some real content in the docs.
* First stab at an icon for the IDE.Jack Jansen2002-03-291-0/+0
|
* repair damage: canceling the "save options" dialog now works again.Just van Rossum2002-03-291-4/+3
|
* repair damage: now works again as a CFM app.Just van Rossum2002-03-291-1/+1
|