diff --git a/include/zipr_mem_space.h b/include/zipr_mem_space.h index 595c2ce16dfece5f2c70d328e538c1e71bd2b471..493c054a086cc5d84c9ad8fc6a1b4a235fa45c9c 100644 --- a/include/zipr_mem_space.h +++ b/include/zipr_mem_space.h @@ -74,7 +74,8 @@ class ZiprMemorySpace_t : public MemorySpace_t min_plopped=std::min(addr,min_plopped); max_plopped=std::max(addr,max_plopped); - if(this->find(addr) == this->end() ) + if(this->find(addr) == this->end() && + IsValidRange(FindFreeRange(addr))) /* and, the range is free. */ this->SplitFreeRange(addr); (*this)[addr]=the_byte; } diff --git a/src/zipr.cpp b/src/zipr.cpp index 9e1a1aae6a96f1162a47a5ab4da68dcb51388c0d..19f541f2a873ff8b210916328f15a59de4087bb2 100644 --- a/src/zipr.cpp +++ b/src/zipr.cpp @@ -1515,12 +1515,6 @@ void ZiprImpl_t::PlaceDollops() cout << "Reserving " << std::hex << placement.GetStart() << ", " << std::hex << cur_addr << "." << endl; memory_space.SplitFreeRange(Range_t(placement.GetStart(), cur_addr)); - for (RangeAddress_t i = placement.GetStart(); - i<cur_addr; - i++) - { - memory_space[i] = 0x0; - } } }