-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad Alloc #41
Comments
I used gdb and get below (_n=18446744073709547290) after statement std::__uninitialized_fill_n_a<unsigned int*, unsigned long, unsigned int, unsigned int> (__first=0x0, __n=0, __x=@0x7fffffffdefc: 0) (gdb) std::__fill_n_a<unsigned int*, unsigned long, unsigned int> (__first=0x0, __n=0, __value=@0x7fffffffdefc: 0) at /usr/include/c++/4.7/bits/stl_algobase.h:742 std::__uninitialized_fill_n::__uninit_fill_n<DRAMSim::Bank*, unsigned long, DRAMSim::Bank> (__first=0x6535d0, __n=8, __x=...) (gdb) 50 (&const_cast<char&>(reinterpret_cast<const volatile char&>(__r))); |
Dears,
I get the below error while creating a new rank object because of adding new bankstates (nextWrite_H & nextRead_H) in BankState.h and BankState.cpp. Do you know why?
class BankState
{
ostream &dramsim_log;
public:
//Fields
CurrentBankState currentBankState;
unsigned openRowAddress;
uint64_t nextRead;
uint64_t nextWrite;
uint64_t nextRead_H;
uint64_t nextWrite_H;
uint64_t nextActivate;
uint64_t nextPrecharge;
uint64_t nextPowerUp;
};
}
//All banks start precharged
BankState::BankState(ostream &dramsim_log_):
dramsim_log(dramsim_log_),
currentBankState(Idle),
openRowAddress(0),
nextRead(0),
nextRead_H(0),
nextWrite(0),
nextWrite_H(0),
nextActivate(0),
nextPrecharge(0),
nextPowerUp(0),
lastCommand(READ),
stateChangeCountdown(0)
{}
Rank *r = new Rank(dramsim_log);
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)
The text was updated successfully, but these errors were encountered: