Suramya's Blog : Welcome to my crazy life…

November 7, 2024

Artificial Intelligence is not a reason to stop using your natural Intelligence

Filed under: Artificial Intelligence,My Thoughts,Tech Related — Suramya @ 6:59 PM

The more I see posts about some of the proposed use cases for AI the more I feel that some people just don’t want to use their brains and want to outsource all thinking to the ‘AI’. The latest example that triggered this post is screenshoted & Quoted below:

See BlockQuote Below the Image

Though malloc is a very useful function in c, it is not without its problems. The biggest is that it can be confusing for some to decide how much memory to allocate, needing complicated statements with sizeof . To solve this I propose a new alternative to malloc that utilizes the power of modern developments in Al, mallocPlusAI . The usage is simple.

int* x = (int*)mallocPlusAI(“Enough memory to store up to 5 integers”);

mallocPlusAI takes in a character array which is forwarded to a ChatGPT instance alongside an initial prompt “You are a memory allocator for a computer, and you need to tell me how many. bytes of memory I would need to accomplish a certain task. Make sure to give your response as only a whole number of bytes, do not provide any other text. Here is what I request: “

So instead of doing something like the following

5 * sizeof(int) + allocation overhead

Because apparently it is too hard to type 5 * sizeof() * Allocation Overhead, we will call an external API which brings the following downsides:

  • Which has a cost associated with it
  • Adds another layer of complexity & dependency to your application
  • Each ChatGPT query consumes an estimated 2.9 Wh of electricity, nearly ten times more than a standard Google search
  • Opens an avenue for attack where the remote prompt can be modified by a malicious actor to return incorrect values of size potentially causing the application to crash or leak data

Can someone please explain to me why you would use something like this instead of spending 2 mins thinking about what size of memory to assign?

– Suramya

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress