Raised This Month: $32 Target: $400
 8% 

[EXTENSION] SM-Memory


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Scag
AlliedModders Donor
Join Date: May 2017
Location: Crashing Hale
Old 10-05-2020 , 21: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:
Spoiler


Case 2
Spoiler


Case 2.5:
Spoiler


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.

Releases
Source
__________________
Over-engineering is underrated.

GitHub
BTC
ETH

Retired

Last edited by Scag; 10-08-2021 at 18:36. Reason: Rewrite use case #1
Scag is offline
Reply


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 00:29.


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