home.social

#subsky — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #subsky, aggregated by home.social.

  1. RE: fosstodon.org/@golemwire/11507

    I'm starting a Fluxer (Discord alternative) group for my computing environment :D

    Invite link: fluxer.gg/I2P03SBv

  2. #Programming tip: if you want to allocate memory and explicitly tell the kernel you don't want the memory backed until you use it, try mmap(). Really useful.

    An example of mmap being used this way. gitlab.com/golemwire/subsky/-/ (permalink gitlab.com/golemwire/subsky/-/ )
    This is from my #SubSky emulator.

    (p_cpu->p_memory = (uint8_t *) mmap(NULL, (size_t) 1 << 32, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0))

    #mmap #kernel

  3. tip: if you want to allocate memory and explicitly tell the kernel you don't want the memory backed until you use it, try mmap(). Really useful.

    An example of mmap being used this way. gitlab.com/golemwire/subsky/-/ (permalink gitlab.com/golemwire/subsky/-/ )
    This is from my emulator.

    (p_cpu->p_memory = (uint8_t *) mmap(NULL, (size_t) 1 << 32, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0))