-/* Copyright (c) 2009-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2009-2017. 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. */
* name, but now the name is stored at SIMIX level, so we pass a null */
this->thread_ =
xbt_os_thread_create(nullptr,
- maestro ? ThreadContext::maestro_wrapper : ThreadContext::wrapper,
+ maestro ? &ThreadContext::maestro_wrapper : &ThreadContext::wrapper,
this, this);
/* wait the starting of the newly created process */
xbt_os_sem_acquire(this->end_);
// Copy and move
ChunkedData(ChunkedData const& that)
+ : store_ (that.store_)
+ , pagenos_(that.pagenos_)
+
{
- store_ = that.store_;
- pagenos_ = that.pagenos_;
for (std::size_t pageno : pagenos_)
store_->ref_page(pageno);
}
/* Find the host where the file is physically located and read it */
msg_storage_t storage_src = simgrid::s4u::Storage::byName(fd->storageId);
msg_host_t attached_host = storage_src->getHost();
- read_size = fd->read(size); // TODO re-add attached_host;
+ read_size = fd->read(size); // TODO re-add attached_host
if (strcmp(attached_host->getCname(), MSG_host_self()->getCname())) {
/* the file is hosted on a remote host, initiate a communication between src and dest hosts for data transfer */
}
/* Write file on local or remote host */
// sg_size_t offset = fd->tell();
- sg_size_t write_size = fd->write(size); // TODO readd attached_host;
+ sg_size_t write_size = fd->write(size); // TODO readd attached_host
return write_size;
}
memreg.prot |= PROT_EXEC;
/* Private (copy-on-write) or shared? */
+ memreg.flags = 0;
if (vmentries[i].kve_flags & KVME_FLAG_COW)
memreg.flags |= MAP_PRIVATE;
else
/* Memory allocator `malloc'. */
-/* Copyright (c) 2010-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2010-2017. 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. */
If we loop completely around without finding a large enough
space we will have to get more memory from the system. */
size_t blocks = BLOCKIFY(size);
- size_t start = block = MALLOC_SEARCH_START;
+ size_t start = MALLOC_SEARCH_START;
+ block = MALLOC_SEARCH_START;
while (mdp->heapinfo[block].free_block.size < blocks) {
if (mdp->heapinfo[block].type >=0) { // Don't trust xbt_die and friends in malloc-level library, you fool!
fprintf(stderr,"Internal error: found a free block not marked as such (block=%lu type=%lu). Please report this bug.\n",(unsigned long)block,(unsigned long)mdp->heapinfo[block].type);