harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li" <xiaofeng...@gmail.com>
Subject Re: [drlvm][gc] How to iterate MOS?
Date Tue, 29 Jan 2008 07:45:57 GMT
Can you paste your complete patch with the context? Have you defined
USE_32BITS_HASHCODE? I'd suggest you define it and uncomment the " +
hash_extend_size;"

Thanks,
xiaofeng

On Jan 29, 2008 3:20 PM, Yuri Kashnikoff <yuri.kashnikoff@gmail.com> wrote:
> I am trying to iterate MOS (see below). And on DaCapo::jython I've got
> problems with this code,(vm_object_size crashes). Any
> ideas/suggestions ?
>
>         Blocked_Space *mspace = (Blocked_Space*)gc->mos;
>         Block_Header *curr_block = (Block_Header*)mspace->blocks;
>         Block_Header *space_end =
> (Block_Header*)&mspace->blocks[mspace->free_block_idx -
> mspace->first_block_idx];
>         while(curr_block < space_end) {
>             POINTER_SIZE_INT p_obj = (POINTER_SIZE_INT)curr_block->base;
>             POINTER_SIZE_INT p_next_obj = p_obj;
>             POINTER_SIZE_INT block_end = (POINTER_SIZE_INT)curr_block->free;
>
>             unsigned int hash_extend_size = 0;
>             while(p_obj < block_end){
> #ifdef USE_32BITS_HASHCODE
>                 hash_extend_size  =
> (hashcode_is_attached((Partial_Reveal_Object*)p_obj))?GC_OBJECT_ALIGNMENT:0;
> #endif
>                  p_next_obj = p_obj +
> vm_object_size((Partial_Reveal_Object *)p_obj);// + hash_extend_size;
>                  //do something with p_obj
>                  p_obj = p_next_obj;
>             }
>             curr_block = curr_block->next;
>             if(curr_block == NULL) break;
>         }
>     }
>
>
> --
> Yuri S. Kashnikov
> Novosibirsk State University, Russia
> 2 Pirogova street
> 630090, Novosibirsk-90
> yuri.kashnikoff@gmail.com
>



-- 
http://xiao-feng.blogspot.com

Mime
View raw message