Switch to DuckDuckGo Search
   January 2, 2010  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | >


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:29:05] *** nip has quit IRC
[05:55:28] *** peda has joined #JNode.org
[09:54:26] *** FabienD has joined #JNode.org
[10:15:32] *** echelog-1 has joined #JNode.org
[10:16:26] *** Mazon has joined #JNode.org
[18:11:35] *** ismael has joined #JNode.org
[18:12:07] <ismael> hi
[18:14:47] <ismael> ping FabienD
[18:15:20] <FabienD> hi ismael and happy new year !
[18:15:37] <ismael> FabienD: happy new year for you too
[18:16:08] <ismael> i've started to code the new gc
[18:16:20] <ismael> and i'm having some questions
[18:16:55] <ismael> as i already told you, we chose to implement a generational gc with 2 generations
[18:17:15] <ismael> using a copy algorithm for young objects
[18:17:26] <ismael> and mark&sweep for the old ones
[18:18:09] <ismael> almost like hotspot
[18:21:01] <ismael> I created a new package for the generational gc
[18:21:57] <ismael> org.jnode.vm.memmgr.generational
[18:22:23] <ismael> next to the current default implementation (in package org.jnode.vm.memmgr.def)
[18:22:52] <ismael> my problem is that I need to reuse some classes from "def" in "generational" but they are package protected
[18:23:39] <ismael> FabienD: what is the best way to that?
[18:26:16] <FabienD> ok for the package and the directory for sources
[18:26:23] <FabienD> what class for example ?
[18:26:37] <ismael> VmDefaultHeap
[18:30:46] <FabienD> the simplest is probably to make it public
[18:31:39] <ismael> ok, and concerning its protected method?
[18:32:44] <ismael> like getFreeSize() or walk?
[18:33:27] <FabienD> you want override or call them ?
[18:33:33] <FabienD> one is final
[18:33:56] <FabienD> but the can be called by a subclass : it's what you want, no ?
[18:34:01] <ismael> i want to call them from another package (org.jnode.vm.memmgr.generational)
[18:34:07] <FabienD> s/the/they
[18:34:27] <ismael> as they are protected they can be called in package org.jnode.vm.memmgr.def but not in org.jnode.vm.memmgr.generationnal
[18:35:50] <FabienD> that's wrong : they can be called by the class and its subclasses
[18:36:18] <ismael> and classes from the same package
[18:36:56] <FabienD> it's for package protected methods
[18:38:45] <FabienD> in java, the "protected" keyword on a field/method has the same meaning as in C++ AFAIR
[18:39:13] <ismael> it's what is done in package def: DefaultHeapManager has a reference to VmDefaultHeap, and in the method allocObject() of DefaultHeapManager, the method alloc of VmDefaultHeap is called although it is protected
[18:40:25] <ismael> FabienD: AFAIR, in java protected keywords make methods accessible by children and classes in the same package
[18:41:30] <ismael> FabienD: cf http://www.pps.jussieu.fr/~rifflet/JAVA/visibilite.html
[18:43:08] <FabienD> I have a doubt but :
[18:43:11] <FabienD> VmDefaultHeap extends VmAbstractHeap
[18:44:41] <FabienD> ok, forget my sentence just above
[18:44:47] <FabienD> it appears you're right
[18:49:39] <FabienD> so, you was thinking about aggregation and I was thinking about inheritance ;)
[18:50:01] <ismael> right ;-)
[18:50:25] <FabienD> using inheritance will solve your problem, right ?
[18:50:43] <ismael> how?
[18:51:49] <FabienD> oops VmDefaultHeap is package protected and **final**
[18:52:17] <FabienD> so it should become "public VmDefaultHeap" (no more "final")
[18:52:33] <FabienD> "public class VmDefaultHeap" (no more "final")
[19:29:18] *** ismael has quit IRC
[23:16:36] *** FabienD has quit IRC
top

   January 2, 2010  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | >