1
0
mirror of https://github.com/stefanocasazza/ULib.git synced 2025-09-28 19:05:55 +08:00
This commit is contained in:
stefanocasazza 2020-03-04 22:40:51 +01:00
parent a306894a4c
commit 39e63b9a83
5 changed files with 22 additions and 11 deletions

View File

@ -1109,7 +1109,6 @@ public:
}
void push_back(const UStringRep* rep) { UVector<UStringRep*>::push_back(rep); }
void push_back(const char* t, uint32_t tlen) { UVector<UStringRep*>::push_back(UStringRep::create(tlen, tlen, t)); }
UString last() // return last element
{

View File

@ -7250,7 +7250,7 @@ static void POST_login_request()
if (user_rec->_auth_domain != *account_auth)
{
vec.push_back(user_rec->nodog);
vec.push_back(U_CLIENT_ADDRESS_TO_PARAM);
vec.push_back(UStringRep::create(UServer_Base::client_address_len, UServer_Base::client_address_len, UServer_Base::client_address));
vec.push_back(*UString::str_without_mac);
}
}

View File

@ -194,14 +194,15 @@ public:
void* ptr = (index == 0 ? (void*)pblock : *pblock);
# ifdef DEBUG
if (index)
if (len &&
index)
{
U_INTERNAL_ASSERT_EQUALS( ptr, *pblock)
U_INTERNAL_ASSERT_EQUALS( ptr, *(pointer_block + len))
if (len)
for (uint32_t i = 1; i < len; ++i)
{
U_INTERNAL_ASSERT_DIFFERS(ptr, *(pointer_block + len - 1))
if (ptr == *(pointer_block + len - i))
{
U_ERROR("Duplicate entry on UStackMemoryPool::pop(%u): len = %u i = %u ptr = %p", index, len, i, ptr)
}
}
}
@ -239,6 +240,14 @@ public:
if (depth) --depth;
++push_cnt;
for (uint32_t i = 2; i <= len; ++i)
{
if (ptr == *(pointer_block + len - i))
{
U_ERROR("Duplicate entry on UStackMemoryPool::push(%p): index = %u len = %u i = %u", ptr, index, len, i)
}
}
# endif
}
@ -396,9 +405,13 @@ void* UMemoryPool::pop(int stack_index)
obj_class, func_call, pstack->index, pstack->type, pstack->len, pstack->space, pstack->depth,
pstack->max_depth, pstack->num_call_allocateMemoryBlocks, pstack->pop_cnt, pstack->push_cnt);
}
#endif
void* ptr = pstack->pop();
U_RETURN(ptr);
#else
return pstack->pop();
#endif
}
# ifdef DEBUG

View File

@ -61,7 +61,6 @@ void UThread::close()
if (pthread_equal(tid, obj->tid))
# endif
{
U_INTERNAL_ASSERT_EQUALS(this, obj)
U_INTERNAL_ASSERT_EQUALS(next, obj->next)
*ptr = next;

View File

@ -1 +1 @@
0757
077A