Changeset 34812 for lang/objective-cplusplus
- Timestamp:
- 08/07/09 19:58:16 (4 years ago)
- Location:
- lang/objective-cplusplus/i3/trunk
- Files:
-
- 4 modified
-
am/mil_test.am (modified) (2 diffs)
-
src/mil/include/mil/Memory.h (modified) (5 diffs)
-
src/mil/src/Test11.cpp (modified) (2 diffs)
-
src/mil/src/TestMain.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/objective-cplusplus/i3/trunk/am/mil_test.am
r34792 r34812 24 24 mil_test_CXXFLAGS = ${i3_CXXFLAGS} \ 25 25 ${WARNING_OPTIONS} \ 26 -I${top_srcdir}/src/mil/include -DMIL_PRODUCER_MALLOC26 -I${top_srcdir}/src/mil/include 27 27 28 28 mil_test_LDFLAGS = ${PTHREAD_LIBS} ${BOOST_LDFLAGS} 29 mil_test_LDADD = #${BOOST_UNIT_TEST_FRAMEWORK_LIB}29 mil_test_LDADD = 30 30 31 31 if WITH_OS_WINDOWS … … 36 36 37 37 if WITH_GUI_WINDOWS 38 mil_test_SOURCES += src/mil/src/windows/WindowProcedureTest.cpp38 #mil_test_SOURCES += src/mil/src/windows/WindowProcedureTest.cpp 39 39 mil_test_LDADD += -lgdi32 -luser32 -lpsapi -lshlwapi 40 40 endif -
lang/objective-cplusplus/i3/trunk/src/mil/include/mil/Memory.h
r34810 r34812 83 83 } 84 84 85 #define MIL_PRODUCER_MALLOC uiuiu85 #define MIL_PRODUCER_MALLOCasdf 86 86 #ifdef MIL_PRODUCER_MALLOC 87 87 … … 119 119 #else 120 120 121 #define MIL_DEBUG_PRODUCER ooo121 #define MIL_DEBUG_PRODUCER 122 122 123 123 class Producer { … … 157 157 if (blocks > MALLOC_BLOCKS_THESHOLD) { 158 158 return ::malloc(BYTES); 159 } else if (blocks == 1) { 160 return p.malloc(); 159 161 } else { 160 162 return p.ordered_malloc(blocks); … … 184 186 #else 185 187 { 186 if (blocks > MALLOC_BLOCKS_THESHOLD) {188 if (blocks > (size_t)MALLOC_BLOCKS_THESHOLD) { 187 189 ::free((void*)memory); 190 } else if (blocks == 1) { 191 p.free(memory); 188 192 } else { 189 193 p.free(memory, blocks); … … 236 240 l->blocks = blocks; 237 241 238 if (blocks > MALLOC_BLOCKS_THESHOLD) {242 if (blocks > (size_t)MALLOC_BLOCKS_THESHOLD) { 239 243 #ifdef MIL_DEBUG_PRODUCER 240 244 mem = (T*)((char*)mem - sizeof(Producer::DebugInfo)); -
lang/objective-cplusplus/i3/trunk/src/mil/src/Test11.cpp
r34810 r34812 14 14 namespace Test11 { 15 15 16 atomic<int> global = 0;16 atomic<int> global; 17 17 atomic<int> spin_status; 18 18 … … 37 37 38 38 // bench class 39 const unsigned int POST_MAX = 20000 ;40 const unsigned int NUM_THREADS = 8;39 const unsigned int POST_MAX = 200000; 40 const unsigned int NUM_THREADS = 18; 41 41 42 42 struct Bencher : mil::Module<Bencher> { -
lang/objective-cplusplus/i3/trunk/src/mil/src/TestMain.cpp
r34447 r34812 9 9 } 10 10 11 int main(int argc, char* argv[]) {11 int main(int, char**) { 12 12 QT_RUN_TESTS; 13 13
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)