Commit 28df01ac by Richard Guenther Committed by Richard Biener

tree.c (build_string): Do not waste tail padding in struct tree_string.

2006-06-26  Richard Guenther  <rguenther@suse.de>

	* tree.c (build_string): Do not waste tail padding in
	struct tree_string.

From-SVN: r115021
parent 49799ad3
2006-06-26 Richard Guenther <rguenther@suse.de> 2006-06-26 Richard Guenther <rguenther@suse.de>
* tree.c (build_string): Do not waste tail padding in
struct tree_string.
2006-06-26 Richard Guenther <rguenther@suse.de>
* ggc-page.c (init_ggc): Add missing element to size_lookup * ggc-page.c (init_ggc): Add missing element to size_lookup
table. table.
......
...@@ -1120,8 +1120,9 @@ build_string (int len, const char *str) ...@@ -1120,8 +1120,9 @@ build_string (int len, const char *str)
{ {
tree s; tree s;
size_t length; size_t length;
length = len + sizeof (struct tree_string); /* Do not waste bytes provided by padding of struct tree_string. */
length = len + offsetof (struct tree_string, str) + 1;
#ifdef GATHER_STATISTICS #ifdef GATHER_STATISTICS
tree_node_counts[(int) c_kind]++; tree_node_counts[(int) c_kind]++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment