Opened 11 years ago

Last modified 7 years ago

#794 closed defect (Fixed)

Another minor leak

Reported by: arma Owned by: nickm
Priority: Low Milestone: 0.2.1.x-final
Component: Core Tor/Tor Version: 0.2.1.2-alpha
Severity: Keywords:
Cc: arma, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

rovv> arma: please, look at http://rafb.net/p/ldxDw235.html (sequel of
r16302)

--- mempool.original.c Tue Feb 26 18:56:28 2008
+++ mempool.c Sun Aug 3 13:50:26 2008
@@ -144,7 +144,7 @@

};


/ Number of extra bytes needed beyond mem_size to allocate a chunk. */

-#define CHUNK_OVERHEAD (sizeof(mp_chunk_t)-1)
+#define CHUNK_OVERHEAD STRUCT_OFFSET(mp_chunk_t, mem[0])

/ Given a pointer to a mp_allocated_t, return a pointer to the memory

  • item it holds. */

rovv: exciting. is this an active bug, meaning it's a problem for somebody,
or is this more preventative?
rovv> 3 byte per 128KB chunk. I don't think that is a problem, but

of wasted space?

rovv> yes for x86

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (4)

comment:1 Changed 11 years ago by nickm

This is a no-brainer; we should apply it. First I'll look over mempool.c to make sure that there aren't any
related corresponding changes that need to get made.

comment:2 Changed 11 years ago by nickm

Fixed in r16447 and r16449

comment:3 Changed 11 years ago by nickm

flyspray2trac: bug closed.

comment:4 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.