From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23060 invoked by alias); 8 Jun 2009 07:06:00 -0000 Received: (qmail 23047 invoked by uid 22791); 8 Jun 2009 07:05:59 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f204.google.com (HELO mail-px0-f204.google.com) (209.85.216.204) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Jun 2009 07:05:52 +0000 Received: by pxi42 with SMTP id 42so2388664pxi.0 for ; Mon, 08 Jun 2009 00:05:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.171.3 with SMTP id t3mr43310wfe.36.1244444750629; Mon, 08 Jun 2009 00:05:50 -0700 (PDT) Date: Mon, 08 Jun 2009 07:06:00 -0000 Message-ID: <898285d30906080005n72191f9bn8bf8eb76ff689d18@mail.gmail.com> Subject: Using libgcj with different memory management library. From: abhishek desai To: java@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00021.txt.bz2 Hi, I have a few questions regarding the memory management of libgcj. 1. As per my understanding libgcj uses boehm garbage collector for memory allocations. Are there any allocations in libgcj which are not routed to the garbage collector ? specially the parts of the library written in C++. From what I understand is that the memory allocated with the 'new' operator are routed to the gc . Is it necessary that the class of object being allocated should be derived from the 'object' class for it to be allocated on the gc ? or all the allocations with new get routed to gc ? http://gcc.gnu.org/onlinedocs/gcj/Object-allocation.html#Object-allocation 2. I have a memory manager which allocates memory from a specific memory pool. I want to port boehm gc to use this memory manager for its allocations. Can someone give me some pointers as to where I can make the necessary modifications ? I can see the gcconfig.h and os_dep.c is the file containing the final system memory allocation calls. Is there some other place I need to look at ? Are there any tricky issues I need to look at while doing the porting ? Just for information I am using an ancient version of gcc (version 3.4.6). Regards, Abhishek