Request for review (S) 7017193: Small memory leak in get_stack_bounds // os::create_stack_guard_pages
Poonam Bajaj
poonam.bajaj at oracle.com
Mon Feb 21 23:15:37 PST 2011
Hi Dmitry,
Few comments:
- These changes read the file character by character instead of one line
at a time. Did you check if there is any performance impact due to that ?
- I think the comments should be outside the corresponding if blocks.
And indentation of comment at line 2675 needs to be corrected.
2673 if ( bup == buf+sizeof(buf)-1 ){
2674 /* Address part of /proc/maps couldn't be more than 128 bytes,
2675 * flush the buffer
2676 */
2677 assert(checkme != true, "Should never happen");
2678 bup = buf;
2679 continue;
2680 }
2681
2682 if (*bup == '\n'){
2683 /* We already seen '[' so it's safe to step back.
2684 * if we don't have ack] keyword in this line just flush the buffer
2685 * buffer.
2686 */
2687 if (checkme == false || *((int*)(bup-4)) != *((int*) "ack]") ){
2688 bup = buf;
2689 checkme = false;
2690 continue;
2691 }
- bup variable may be renamed to 'buf_pointer' or something like that.
Thanks,
Poonam
On 2/21/2011 5:50 PM, Dmitry Samersoff wrote:
> Hi Everyone,
>
> http://cr.openjdk.java.net/~dsamersoff/7017193
>
> I'm uncomfortable with one malloc/free cycle per line so decided to
> get rid of getline() call completely.
>
> -Dmitry
>
>
More information about the hotspot-runtime-dev
mailing list