aboutsummaryrefslogtreecommitdiff
path: root/src/common/memarea.c
AgeCommit message (Collapse)Author
2011-03-25Comment out ancient asserts for bug 930; resolve an xxx021Nick Mathewson
2011-03-16Doxygen documentation for about 100 things that didn't have anyNick Mathewson
About 860 doxygen-less things remain in 0.2.2
2011-01-03Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2011-01-03Bump copyright statements to 2011Nick Mathewson
2010-12-15Merge remote branch fix_security_bug_021 into fix_security_bug_022Nick Mathewson
Conflicts: src/common/memarea.c src/or/or.h src/or/rendclient.c
2010-12-13Have all of our allocation functions and a few others check for underflowNick Mathewson
It's all too easy in C to convert an unsigned value to a signed one, which will (on all modern computers) give you a huge signed value. If you have a size_t value of size greater than SSIZE_T_MAX, that is way likelier to be an underflow than it is to be an actual request for more than 2gb of memory in one go. (There's nothing in Tor that should be trying to allocate >2gb chunks.)
2010-07-09Rename log.h to torlog.hNick Mathewson
This should make us conflict less with system files named "log.h". Yes, we shouldn't have been conflicting with those anyway, but some people's compilers act very oddly. The actual change was done with one "git mv", by editing Makefile.am, and running find . -name '*.[ch]' | xargs perl -i -pe 'if (/^#include.*\Wlog.h/) {s/log.h/torlog.h/; }'
2010-02-27Merge remote branch 'origin/maint-0.2.1'Nick Mathewson
Conflicts: src/common/test.h src/or/test.c
2010-02-27Update Tor Project copyright yearsNick Mathewson
2009-12-12*_free functions now accept NULLSebastian Hahn
Some *_free functions threw asserts when passed NULL. Now all of them accept NULL as input and perform no action when called that way. This gains us consistence for our free functions, and allows some code simplifications where an explicit null check is no longer necessary.
2009-05-17Merge commit 'origin/maint-0.2.1'Nick Mathewson
2009-05-17Fix an assertion-failure in memarea_alloc() on 64-bit platforms.Nick Mathewson
The trick is that we should assert that our next_mem pointer has not run off the end of the array _before_ we realign the pointer, since doing that could take us over the end... but only if we're on a system where malloc() gives us ram in increments smaller than sizeof(void*).
2009-05-12Add sentinel values to the end of memarea chunks.Nick Mathewson
This might detect some possible causes of bug 930, and will at least make sure we aren't doing some dumb memory-corruption stuff with the heap and router-parsing.
2009-05-04Update copyright to 2009.Karsten Loesing
2009-05-02Update copyright to 2009.Karsten Loesing
2009-03-21Actually do that memarea_strndup fix right. Not only must you not examine ↵Nick Mathewson
unmapped ram, but you also must not copy it. From lark. svn:r19095
2009-03-21fix from lark: make memarea_strndup() work even at the end of a mmap chunk. ↵Nick Mathewson
Bug was harmless for now, I think. svn:r19094
2009-03-18Add some asserts to try to catch bug 930Nick Mathewson
svn:r19074
2009-01-04Remove svn $Id$s from our source, and remove tor --version --version.Nick Mathewson
The subversion $Id$ fields made every commit force a rebuild of whatever file got committed. They were not actually useful for telling the version of Tor files in the wild. svn:r17867
2008-12-22Make freelist_len in memarea.c static; document a few variables.Nick Mathewson
svn:r17741
2008-12-22Add DOCDOC entries for undocumented static and global variables.Nick Mathewson
svn:r17739
2008-12-22Fix most DOCDOCs remaining and/or added by redox.Nick Mathewson
svn:r17734
2008-12-22Add DOCDOC comments for all undocumented functions. Add missing *s to other ↵Nick Mathewson
comments so that they will get recognized as doxygen. svn:r17729
2008-12-17Resolve many DOCDOCs.Nick Mathewson
svn:r17662
2008-11-05The chunk_size field in memarea_t was never actually set. Remove the whole ↵Nick Mathewson
thing. svn:r17195
2008-04-08 r19249@catbus: nickm | 2008-04-08 14:04:02 -0400Nick Mathewson
Oops. Fix one last memarea freelist bug. svn:r14322
2008-04-08 r19247@catbus: nickm | 2008-04-08 13:50:01 -0400Nick Mathewson
Fix behavior of memarea freelists. svn:r14321
2008-04-08 r19245@catbus: nickm | 2008-04-08 13:33:27 -0400Nick Mathewson
Oops. It turns out that there are some subtle differences between >= and <. svn:r14320
2008-04-08 r19243@catbus: nickm | 2008-04-08 13:28:59 -0400Nick Mathewson
Use a freelist to hold a few recent memarea chunks. We do a kazillion memarea allocs and frees; that cant be good for us. svn:r14319
2008-03-26 r19072@catbus: nickm | 2008-03-26 13:50:24 -0400Nick Mathewson
Add code to debug memory area size. Use results of this code to set a couple of area sizes more sanely. svn:r14201
2008-03-26 r19062@catbus: nickm | 2008-03-26 12:56:25 -0400Nick Mathewson
Fix whitespace svn:r14197
2008-03-26 r19049@catbus: nickm | 2008-03-26 12:33:25 -0400Nick Mathewson
Add new stacklike, free-all-at-once memory allocation strategy. Use it when parsing directory information. This helps parsing speed, and may well help fragmentation some too. hidden-service-related stuff still uses the old tokenizing strategies. svn:r14194