Skip to content

Instantly share code, notes, and snippets.

@Gamer-Guy12
Created May 12, 2025 01:19
Show Gist options
  • Select an option

  • Save Gamer-Guy12/9f01939c0a5dae6eecb5a6270eda9926 to your computer and use it in GitHub Desktop.

Select an option

Save Gamer-Guy12/9f01939c0a5dae6eecb5a6270eda9926 to your computer and use it in GitHub Desktop.
#include <libk/mem.h>
#include <stddef.h>
#include <stdint.h>
void memset(void *ptr, uint8_t value, size_t num) {
uint8_t *newPtr = ptr;
for (size_t i = 0; i < num; i++) {
newPtr[i] = value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment