src/hotspot/share/adlc/arena.cpp
changeset 51092 3b5fd72147c9
parent 51050 96ea37459ca7
parent 51078 fc6cfe40e32a
child 52583 a3aa8d5380d9
equal deleted inserted replaced
51059:bb16beb8f792 51092:3b5fd72147c9
     1 /*
     1 /*
     2  * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    41 void Chunk::chop() {
    41 void Chunk::chop() {
    42   Chunk *k = this;
    42   Chunk *k = this;
    43   while( k ) {
    43   while( k ) {
    44     Chunk *tmp = k->_next;
    44     Chunk *tmp = k->_next;
    45     // clear out this chunk (to detect allocation bugs)
    45     // clear out this chunk (to detect allocation bugs)
    46     memset(k, 0xBAADBABE, k->_len);
    46     memset(k, 0xBE, k->_len);
    47     free(k);                    // Free chunk (was malloc'd)
    47     free(k);                    // Free chunk (was malloc'd)
    48     k = tmp;
    48     k = tmp;
    49   }
    49   }
    50 }
    50 }
    51 
    51