indiantarget / quimeraengine

0 stars 0 forks source link

QPoolAllocator 001 #545

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Information about the task here:

https://drive.google.com/file/d/0B0FuyHpDsrcfOTZRSi1rSzVSZm8/edit?usp=sharing

This task also includes:
-Replace pointers to QPoolAllocator by references in QFixedArray. GetAllocator 
will still return a pointer.
-Replace calls to operator new in QFixedArray with calls to Reallocate.
-Replace pointers to QPoolAllocator by references in QList. GetAllocator will 
still return a pointer.
-Replace calls to operator new in QList with calls to Reallocate.

Original issue reported on code.google.com by Lince3D@gmail.com on 29 Apr 2014 at 7:43

GoogleCodeExporter commented 9 years ago

Original comment by Lince3D@gmail.com on 27 May 2014 at 3:11

GoogleCodeExporter commented 9 years ago

Original comment by Lince3D@gmail.com on 28 May 2014 at 9:37

Attachments:

GoogleCodeExporter commented 9 years ago
Patch updated.

Original comment by Lince3D@gmail.com on 29 May 2014 at 11:02

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by Lince3D@gmail.com on 29 May 2014 at 11:35

GoogleCodeExporter commented 9 years ago

Original comment by Lince3D@gmail.com on 30 May 2014 at 2:56

Attachments:

GoogleCodeExporter commented 9 years ago
QList_Test.cpp:
---------------

0) COMPILER ERROR in 'Tools' project (** after applying the patch; there was 
not compiler errors before **)

1>d:\dev_projects\quimeraengine_pararevision545\trunk\headers\qlist.h(541): 
error C2065: 'm_pElementAllocator' : undeclared identifier
1>          
d:\dev_projects\quimeraengine_pararevision545\trunk\headers\qlist.h(540) : 
while compiling class template member function 
'Kinesis::QuimeraEngine::Common::DataTypes::pointer_uint_q 
Kinesis::QuimeraEngine::Tools::Containers::QList<T>::GetCount(void) const'
1>          with
1>          [
1>              T=Kinesis::QuimeraEngine::Common::DataTypes::u64_q
1>          ]
1>          
d:\dev_projects\quimeraengine_pararevision545\trunk\testing\tests\unit\testmodul
e_tools\qlistwhitebox.h(52) : see reference to class template instantiation 
'Kinesis::QuimeraEngine::Tools::Containers::QList<T>' being compiled
1>          with
1>          [
1>              T=Kinesis::QuimeraEngine::Common::DataTypes::u64_q
1>          ]
1>          
d:\dev_projects\quimeraengine_pararevision545\trunk\testing\tests\unit\testmodul
e_tools\qlist_test.cpp(53) : see reference to class template instantiation 
'Kinesis::QuimeraEngine::Tools::Containers::Test::QListWhiteBox<T>' being 
compiled
1>          with
1>          [
1>              T=Kinesis::QuimeraEngine::Common::DataTypes::u64_q
1>          ]
1>d:\dev_projects\quimeraengine_pararevision545\trunk\headers\qlist.h(541): 
error C2227: left of '->GetAllocatedBytes' must point to 
class/struct/union/generic type
1>          type is ''unknown-type''

Assertions.h:
-------------

1) '...about functions that are suppossed not to throw exceptions...' <-- 
'supposed'.

QFixedArray.h:
--------------

2) It could be convenient that, in the documentation of type T, insist a bit 
and say
that it cannot be zero. 

QList.h:
--------

3) Copy Constructor (still commented): Could it be the chance to be 
'sizeof(QList::QLink) == 0'?.
If it does, an assertion for warning about a division by zero should be added.

QPoolAllocator.h:
-----------------

4) ::Reallocate. Does not work the Quimera casting operators, and for that 
reason
C-cast operator have been used?. If not, please replace the C-castings by 
Quimera casting operators.

5) ::InternalReallocate: same as 4).

6) ::InternalReallocate Please change the 'uIndex++' postincrement in the last 
for statement by '++uIndex' preincrement.

QPoolAllocator_Test.cpp:
----------------------

7) Some stuff regarding to the following tests:

Reallocate1_PoolContentIsCorrectlyCopied_Test
Reallocate1_SizesAreCorrectAfterReallocation_Test
Reallocate1_AllocationsCanBeDoneAfterReallocatingFullAllocator_Test
Reallocate1_AssertionFailsWhenInputSizeIsNotGreaterThanCurrentPoolSize_Test
Reallocate2_PoolContentIsCorrectlyCopied_Test
Reallocate2_SizesAreCorrectAfterReallocation_Test
Reallocate2_AllocationsCanBeDoneAfterReallocatingFullAllocator_Test
Reallocate2_AssertionFailsWhenInputSizeIsNotGreaterThanCurrentPoolSize_Test
Reallocate2_AssertionFailsWhenInputBufferIsNull_Test

7.1) Is 'ALLOCATOR' a const pool?. If not, why is necessary to write its name 
in Upper Case letters, instead of lower case ones?.

7.2) 
Reallocate1_AssertionFailsWhenInputSizeIsNotGreaterThanCurrentPoolSize_Test: 
there's some operations on this test in which the size and alignment of 'int' 
type is involved, is it right?. If not, replace the 'int' type by the 
correspondent Quimera basic type.

Original comment by anderson...@gmail.com on 8 Jun 2014 at 10:06

GoogleCodeExporter commented 9 years ago

Original comment by Lince3D@gmail.com on 11 Jun 2014 at 6:04