Top Banner
Short-term Regions A Region based Short-term Memory Allocator Stephanie Stroka [email protected]
20
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Short-term Regions

Short-term RegionsA Region based Short-term Memory Allocator

Stephanie Stroka • [email protected]

Page 2: Short-term Regions

MEMORY LEAKS DUE TOPROGRAMMING ERRORS

Page 3: Short-term Regions
Page 4: Short-term Regions

SHORT-TERM MEMORY

Page 5: Short-term Regions
Page 6: Short-term Regions
Page 7: Short-term Regions

vo id ∗ scm malloc ( s i z e t s ize ) ;vo id scm refresh ( vo id ∗ p t r , i n t e x p i r a t i o n ) ;vo id scm t ick ( ) ;

Page 8: Short-term Regions
Page 9: Short-term Regions

const i n t scm create reg ion ( ) ;vo id ∗ scm mal loc in reg ion ( s i z e t s ize ,

const i n t r e g i d ) ;vo id scm re f resh reg ion ( const i n t reg id ,

i n t e x p i r a t i o n ) ;vo id scm refresh ( vo id ∗ p t r , i n t e x p i r a t i o n ) ;vo id scm t ick ( ) ;

Page 10: Short-term Regions
Page 11: Short-term Regions
Page 12: Short-term Regions
Page 13: Short-term Regions
Page 14: Short-term Regions
Page 15: Short-term Regions

Performance gain of STR compared to MALLOC.

SINGLE-THREADED

AVG 55.47 %MIN 51.97 %MAX 58.44 %MULTI-THREADED

AVG 65.47 %MIN 52.94 %MAX 70.11 %

Page 16: Short-term Regions

Performance gain of STR compared to STM.

SINGLE-THREADED

AVG 79.60 %MIN 78.80 %MAX 80.39 %MULTI-THREADED

AVG 87.26 %MIN 75.51 %MAX 95.20 %

Page 17: Short-term Regions

1000

10000

100000

1e+06

0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000

Mem

ory

(byte

s, lo

gscale

)

Allocation Phase

Memory Consumption - sh6bench multi-threaded, nonleaky

MALLOC areaMALLOC gross memory

STM areaSTM gross memory

STR areaSTR gross memory

STRMC areaSTRMC gross memory

net memory

Page 18: Short-term Regions

1000

10000

100000

1e+06

1e+07

0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000

Mem

ory

(byte

s, lo

gscale

)

Allocation Phase

Memory Consumption - sh6bench multi-threaded, leaky

MALLOC_LEAK areaMALLOC_LEAK gross memory

STM_LEAK areaSTM_LEAK gross memory

STR_LEAK areaSTR_LEAK gross memory

STRMC_LEAK areaSTRMC_LEAK gross memory

net memory

Page 19: Short-term Regions

1000

10000

100000

1e+06

1e+07

0 10000 20000 30000 40000 50000 60000 70000 80000 90000 100000

Mem

ory

(byte

s, lo

gscale

)

Allocation Phase

Memory Consumption - sh6bench multi-threaded, leaky

MALLOC_LEAK areaMALLOC_LEAK gross memory

STM_LEAK areaSTM_LEAK gross memory

STR_LEAK areaSTR_LEAK gross memory

STRMC_LEAK areaSTRMC_LEAK gross memory

net memory

The percentage of unused (allocated, but not needed) memoryin sh6bench.

Fragmentation in %single-threaded multi-threaded

MALLOC 1.0700 17.1700MALLOC LEAK 99.3000 99.3700STM 26.0100 72.2400STM LEAK 27.7000 71.0900STR 37.0000 81.6300STR LEAK 39.1100 82.6400

Page 20: Short-term Regions

PERFORMANCE AT ACOST OF MEMORY,NO MEMORY LEAKS