A method for allocating memory in a computing device having a non-volatile main memory, the method comprising: receiving, by a memory allocator, a request for non-volatile memory allocation of an object from a program executing on the computing device, the request comprising a requested memory size and registration data from the program; storing the registration data in a log in the non-volatile main memory; finding an available address of one of a plurality of portions of a page of the non-volatile memory, the page being a block of allocable memory; searching an active page table in the non-volatile main memory to find the page and if the page is not found in the active page table: inserting the page into the active page table, the page corresponding to the available address for the block of allocable memory; and waiting for at most one memory write for inserting the page into the active page table to complete when the page is not found in the active page table, thereby allocating the memory; wherein the registration data comprises at least one of a name of a recovery function stored in the non-volatile main memory, a pointer to the recovery function, and an identifier for invoking the recovery function, and wherein information indicating an object type is included in metadata of each of the plurality of pages and/or included in the active page table. receiving, by a memory allocator, a request for non-volatile memory allocation of an object from a program executing on the computing device, the request comprising a requested memory size and registration data from the program; storing the registration data in a log in the non-volatile main memory; finding an available address of one of a plurality of portions of a page of the non-volatile memory, the page being a block of allocable memory; searching an active page table in the non-volatile main memory to find the page and if the page is not found in the active page table: inserting the page into the active page table, the page corresponding to the available address for the block of allocable memory; and waiting for at most one memory write for inserting the page into the active page table to complete when the page is not found in the active page table, thereby allocating the memory; wherein the registration data comprises at least one of a name of a recovery function stored in the non-volatile main memory, a pointer to the recovery function, and an identifier for invoking the recovery function, and wherein information indicating an object type is included in metadata of each of the plurality of pages and/or included in the active page table. inserting the page into the active page table, the page corresponding to the available address for the block of allocable memory; and waiting for at most one memory write for inserting the page into the active page table to complete when the page is not found in the active page table, thereby allocating the memory; wherein the registration data comprises at least one of a name of a recovery function stored in the non-volatile main memory, a pointer to the recovery function, and an identifier for invoking the recovery function, and wherein information indicating an object type is included in metadata of each of the plurality of pages and/or included in the active page table.