cai567890 / pcsx2

Automatically exported from code.google.com/p/pcsx2
1 stars 0 forks source link

Stack usage reduction by changing how plugin names are calculated (and other minor changes) #1452

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, just want to say thanks for such a great project!

The first patch changes some of the 3rd party projects to be unicode builds. 
VS2013 was complaining otherwise. I imagine that other configurations should 
also be set to unicode.

The second patch refactors how plugin names are worked out. This should reduce 
stack usage by only using the required memory. This patch also changes some 
sprintf's to snprintf's to avoid potential buffer overflows. Also it fixes some 
various const correctness issues. Finally, it removes some redundant NULL 
checks when calling SAFE_DELETE and SAFE_ARRAY_DELETE.

I imagine that the second patch is the more controversial. I probably should 
have split it up into four that cover the different points, but I got carried 
away.

Original issue reported on code.google.com by matt-bra...@live.co.uk on 9 Dec 2013 at 12:07

Attachments:

GoogleCodeExporter commented 9 years ago
Awesome, thanks for contributing!
I'll go over your patches as soon as time allows, if no one else does it before 
me.

Original comment by ramapcsx2.code on 9 Dec 2013 at 8:16

GoogleCodeExporter commented 9 years ago
Here's another small one, but with a decent effect. Should save (256 - 32) * 
sizeof(char*) bytes (896 on x86).

Original comment by matt-bra...@live.co.uk on 9 Dec 2013 at 11:08

Attachments: