<DIV>Hello, </DIV>
<DIV> </DIV>
<DIV>Thanks for your answer</DIV>
<DIV> </DIV>
<DIV>> What are you goals with pool allocation btw?<BR></DIV>
<DIV>At this moment I have some fuzzy ideas, but I am trying to clarify some things so that I can have something more concrete.</DIV>
<DIV> </DIV>
<DIV>Thanks</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><BR><BR><B><I>Chris Lattner <sabre@nondot.org></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">On Mon, 21 Feb 2005, xavier wrote:<BR><BR>> Hello,<BR>><BR>> I have some questions about Pool Allocation<BR>><BR>> Is it possible for a program to access and manipulate an (automatically <BR>> allocated) pool at run time? For example, if a program wants to dump all <BR>> the allocated pools that is using, is it possible to enumerate all those <BR>> pools and access them (contents and information about the pool) and then <BR>> dump all this information to a file?<BR><BR>Yes, but not in any simple way. You basically have to hack the pool <BR>runtime to do the stuff you want. If you look at the actual runtime we <BR>use by default (llvm-poolalloc/runtime/FL2Allocator/), you can see there <BR>are various #defines you can enable for debugging in the .cpp file:<BR><BR>#ifndef NDEBUG<BR>// Configuration macros. Define up to one of these.<BR>//#define
 PRINT_NUM_POOLS // Print use dynamic # pools info<BR>//#define PRINT_POOLDESTROY_STATS // When pools are destroyed, print stats<BR>#define PRINT_POOL_TRACE // Print a full trace<BR>#endif<BR><BR><BR>> Also, please correct me if I am wrong. I understand that if in a program <BR>> there are two disjoint data structures and this data structure has 4 <BR>> different kinds of nodes (heterogeneous nodes), the runtime system is <BR>> going to create 8 different pools? : 2 disjoint "instances" (e.g., two <BR>> complete trees) of the same data structure * 4 kinds of nodes = 8 <BR>> different pools.<BR><BR>Yes, that's the idea. Up to the limit of what the pointer analysis (which <BR>tends to be very good) can prove though.<BR><BR>> At runtime, Can I identify all the pools that belong to a specific <BR>> instance of any of the data structures and then dump only the pools that <BR>> belong to that specific instance?<BR><BR>Today, not really. However, it would!
  be
 straight-forward to add ID <BR>numbers to the pool creation sites and record the info in the pool <BR>descriptor.<BR><BR>What are you goals with pool allocation btw?<BR><BR>-Chris<BR><BR>-- <BR>http://nondot.org/sabre/<BR>http://llvm.cs.uiuc.edu/<BR><BR>_______________________________________________<BR>LLVM Developers mailing list<BR>LLVMdev@cs.uiuc.edu http://llvm.cs.uiuc.edu<BR>http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev<BR></BLOCKQUOTE><p>
                <hr size=1>Do you Yahoo!?<br> 
Yahoo! Mail - Find what you need with new enhanced search. <a href="http://us.rd.yahoo.com/evt=29917/*http://info.mail.yahoo.com/mail_250">Learn more.</a>