and what is element means here?
i think the allocator manage the shared memory in a segment-page form.that is,a shared memory is a segment,which contains pages of equal size.a chunk contains some pages of a single segment(or multi-segment?),but a block is a actual structure in a page and it should not be larger than page size.
and an element means...
well, i got confused.please give me some indication.thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
oh,a segment is the shared memory applied by a alloc_key,but block and element and page are the same. i think.they are mark by allocator_bit_vector,which is contained at each segment,right after shared_memory_header_t.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
since allocator_bit_vector is a general class(it can manage segments and pages each),so a more general name must be used.you choose elements and blocks,right?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i think i know now.
segment contains pages and chunk.
chunk is allocated by pages.
but chunk is used in elements of class T.
both chunk and segment has it's own header and vector_bit at the beginning.
well done!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your continued interest in the allocator. I have a couple of articles submitted documenting the project. I am waiting for their publication. Then I will post them in the document section of the project. The articles answer the questions you ask.
For the bug report you posted, these are mistakes. I have corrected them in the CVS repository and will post the fixes in the next release. What i think the system really needs is a regression test case which fails due to the oversights you found. So, far the code works regardless of the missing tests for this_chunk == 0, as I think that case never comes up, but the test for the 0 condition should be there. I agree.
Can you think of a regression test case which would spot the this_chunk == 0 error?
Marc
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi,bumble:
what is the relationship of segment,page,chunk and block?
these four concepts sometimes confused me while i'm reading your code.
please tell me the difference.
many thanks
and what is element means here?
i think the allocator manage the shared memory in a segment-page form.that is,a shared memory is a segment,which contains pages of equal size.a chunk contains some pages of a single segment(or multi-segment?),but a block is a actual structure in a page and it should not be larger than page size.
and an element means...
well, i got confused.please give me some indication.thanks
oh,a segment is the shared memory applied by a alloc_key,but block and element and page are the same. i think.they are mark by allocator_bit_vector,which is contained at each segment,right after shared_memory_header_t.
allocator_bit_vector is also use in shared template class,but this time it represents segments,not pages.
since allocator_bit_vector is a general class(it can manage segments and pages each),so a more general name must be used.you choose elements and blocks,right?
i think i know now.
segment contains pages and chunk.
chunk is allocated by pages.
but chunk is used in elements of class T.
both chunk and segment has it's own header and vector_bit at the beginning.
well done!
Stephen,
Thanks for your continued interest in the allocator. I have a couple of articles submitted documenting the project. I am waiting for their publication. Then I will post them in the document section of the project. The articles answer the questions you ask.
For the bug report you posted, these are mistakes. I have corrected them in the CVS repository and will post the fixes in the next release. What i think the system really needs is a regression test case which fails due to the oversights you found. So, far the code works regardless of the missing tests for this_chunk == 0, as I think that case never comes up, but the test for the 0 condition should be there. I agree.
Can you think of a regression test case which would spot the this_chunk == 0 error?
Marc