Raised This Month: $128 Target: $400


Post New Thread Reply   
Thread Tools Display Modes
Author Message
AlliedModders Donor
Join Date: May 2017
Location: Crashing Hale
Old 10-05-2020 , 22:07   [EXTENSION] SM-Memory
Reply With Quote #1

I wanted to write an extension, so I wrote one.

SM Memory exposes your basic cstdlib memory functions for SourceMod plugins to use, giving them more control over memory allocation and deallocation.

With that said, when would you ever want to use an extension that does something like this?
The answer: Never.

SourceMod gives you enough control already. You shouldn't be using this extension just for the sake of raw pointers.

There are only 2 possible cases I could think of in which this extension would ever be useful.

Case 1:

Case 2

Case 2.5:

Also worth mentioning that you're in control of what you do with the memory, therefore you are responsible for it. There's no safety net, no precautions, no nothing. It's all on you. Everything remains as is even if your plugin unloads. This is why I can't stress this enough when I say that you really shouldn't use this extension unless absolutely necessary.

I can go on and on about how this isn't a safe extension to use, but surely that's gotten through your head. TLDR; only use it for things it's needed for.

Note, if you're running 64-bit SourceMod, you'll need to build the ext yourself. Releases will not work at all with 64-bit servers.

Over-engineering is underrated.


Last edited by Scag; 10-07-2020 at 02:35.
Scag is offline

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -4. The time now is 21:28.

Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode