-/* Copyright (c) 2009 Da SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009, 2010. The SimGrid Team.
+ * All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
xbt_workload_data_chunk_t xbt_workload_data_chunk_new(int size) {
xbt_workload_data_chunk_t res = xbt_new0(s_xbt_workload_data_chunk_t,1);
- res->size = size;
- res->chunk = xbt_new(char,size-sizeof(res)-sizeof(int));
+ res->size = size-sizeof(res)-sizeof(int);
+ res->chunk = xbt_new(char,res->size);
return res;
}
void xbt_workload_data_chunk_free(xbt_workload_data_chunk_t c) {