Skip to content

humboldt123/gptmalloc.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gptmalloc.c

AI powered memory management.

Example

#include <stdio.h>
#include <stdlib.h>

#include "gptmalloc.h"

int main()
{
    // allocate your memory using natural language 👇
    int* gpt_ptr = (int*)malloc_with_ai("Enough memory to store up to five integers.");

    for (int i = 0; i < 5; i++)
    {
        gpt_ptr[i] = i + 1;
    }

    // returns a pointer just like malloc(), make sure to free it when you're done 😉
    free(gpt_ptr);
    return 0;
}

Setup

Set your OpenAI API Key as an enviroment variable

export LLM_API_KEY=sk_openai_api_key_goes_here;

Endorsed by ElanMakesGames

image

About

ai powered memory management!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published