You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a test with an 64 bit i5 CPU using 1MB pool size with different SL_INDEX_COUNT_LOG2 settings and allocation sizes.
The algorithm:
size_talloc_size=1; //or 8 or 1024;void*p;
uint32_tc=0;
do {
p=lv_mem_alloc(alloc_size); //Just a wrapper around tlsf_allocc++;
}while(p);
//Uses lv_tlsf_walk_pool to get some memory infolv_mem_monitor_tm;
lv_mem_monitor(&m);
printf("count: %d, free: %d\n", c, m.free_size);
return0;
The results: alloc_size=1
SL_INDEX_COUNT_LOG=5 count: 32415, free: 0
SL_INDEX_COUNT_LOG=1 count: 32510, free: 0
alloc_size=8
SL_INDEX_COUNT_LOG=5 count: 32415, free: 0
SL_INDEX_COUNT_LOG=1 count: 32510, free: 0
alloc_size=1024
SL_INDEX_COUNT_LOG=5 count: 1006, free: 80
SL_INDEX_COUNT_LOG=1 count: 1009, free: 24
So with SL_INDEX_COUNT_LOG=1 always more blocks were allocated, I guess it's because of the smaller control_t overhead.
Hence, SL_INDEX_COUNT_LOG=1 always seems better than 5, but I probably I miss something. Could you comment on this?
The text was updated successfully, but these errors were encountered:
Hi,
I made a test with an 64 bit i5 CPU using 1MB pool size with different
SL_INDEX_COUNT_LOG2
settings and allocation sizes.The algorithm:
The results:
alloc_size=1
SL_INDEX_COUNT_LOG=5 count: 32415, free: 0
SL_INDEX_COUNT_LOG=1 count: 32510, free: 0
alloc_size=8
SL_INDEX_COUNT_LOG=5 count: 32415, free: 0
SL_INDEX_COUNT_LOG=1 count: 32510, free: 0
alloc_size=1024
SL_INDEX_COUNT_LOG=5 count: 1006, free: 80
SL_INDEX_COUNT_LOG=1 count: 1009, free: 24
So with
SL_INDEX_COUNT_LOG=1
always more blocks were allocated, I guess it's because of the smallercontrol_t
overhead.Hence,
SL_INDEX_COUNT_LOG=1
always seems better than5
, but I probably I miss something. Could you comment on this?The text was updated successfully, but these errors were encountered: