This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A simple on-demand based mmap alloc-only proof-of-concept to just check out the possibilities of having a | |
* single giant MAP_FIXED allocation for a process that may not need to call free at all and just work with a | |
* contiguous allocation space | |
* | |
* A mmap contiguous hole space is reserved with a PROT_READ and then individual pages overridden with | |
* PROT_WRITE on page faults in sigsegv handler which mmaps the faulting address space. | |
* | |
* As a test, a 1 GIG file is created and then read into the memory allocated from the contiguous vma which is a | |
* brain-dead linear allocator from the address space as there are no requirements to free memory here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Typical way of handling the email in the controller | |
class UsersController < ApplicationController | |
def create | |
@user = User.new params[:user] | |
UserMailer.deliver_welcome(@user) if @user.save | |
end | |
end |