Esempio n. 1
0
OOBase::POSIX::pw_info::pw_info(const char* uname) : m_pwd(NULL)
{
	size_t size = get_size();
	if (!m_data.resize(size))
		OOBase_CallCriticalFailure(ERROR_OUTOFMEMORY);

	int err = 0;
	do
	{
		err = ::getpwnam_r(uname,&m_pwd2,m_data.get(),m_data.size(),&m_pwd);
	} while (err == EINTR);

	if (err)
		errno = err;
}
Esempio n. 2
0
OOBase::ArenaAllocator::ArenaAllocator(bool locked) : m_mspace(NULL)
{
	m_mspace = create_mspace(0,locked ? 1 : 0);
	if (!m_mspace)
		OOBase_CallCriticalFailure("Failed to create dl_malloc mspace");
}