Mercurial > hg > CbC > CbC_gcc
comparison gcc/memory-block.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* Shared pool of memory blocks for pool allocators. | 1 /* Shared pool of memory blocks for pool allocators. |
2 Copyright (C) 2015-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2015-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify | 6 GCC is free software; you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
66 memory_block_pool::release (void *uncast_block) | 66 memory_block_pool::release (void *uncast_block) |
67 { | 67 { |
68 block_list *block = new (uncast_block) block_list; | 68 block_list *block = new (uncast_block) block_list; |
69 block->m_next = instance.m_blocks; | 69 block->m_next = instance.m_blocks; |
70 instance.m_blocks = block; | 70 instance.m_blocks = block; |
71 | |
72 VALGRIND_DISCARD (VALGRIND_MAKE_MEM_NOACCESS ((char *)uncast_block | |
73 + sizeof (block_list), | |
74 block_size | |
75 - sizeof (block_list))); | |
71 } | 76 } |
72 | 77 |
73 extern void *mempool_obstack_chunk_alloc (size_t) ATTRIBUTE_MALLOC; | 78 extern void *mempool_obstack_chunk_alloc (size_t) ATTRIBUTE_MALLOC; |
74 extern void mempool_obstack_chunk_free (void *); | 79 extern void mempool_obstack_chunk_free (void *); |
75 | 80 |