Yeah that was clear enough.
Thanks a lot. Your code is of great help.

Regards
Sahil

On 31 March 2015 at 19:45, Elazar Leibovich
<[email protected]> wrote:
> I wanted to ensure the user always see contiguous array of data from
> the ring buffer.
>
> The last piece of data, say "abcde" could wrap around in the ring
> buffer and appear like:
>
> [de...                 ...abc]
>
> I wanted the user to see a contigious array of the form [abcde].
>
> So in the case I'm having input that wrap around, I'll simply copy it
> to the first buffer
>
> [wrap_buffer][de..                 ...abc]
> would become
> [               abc][de...               ...abc]
>
> And then I'll the user pointer to the leftmost "a", and he'll see
> "abcde" without knowing he's handling a ring buffer.
>
> Let me know if I was clear enough.
>
> On Tue, Mar 31, 2015 at 2:18 PM, sahil aggarwal <[email protected]> wrote:
>>
>> Hi Elazar
>>
>> Can you help me understand why you have used
>> mmap_pages->wrap_base.? And, instead of allocating
>> (2^n)+1 pages you allocate (2^n)+2 pages, why so.?
>> wrap_base points to (2^n)+2 pages and base points to
>> (2^n)+1 pages, what is use of wrap_base.? I tried reading
>> perf source too, there it seems they use (2^n)+1 pages only.
>>
>>
>> Thanks
>> Regards
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to