fix appveyor installer and build (#224)

* remove exception handler when function returns or throws

* revert to only reserving and not committing memory due to issues

* appveyor builds for release, caches more, only publish artifact once
This commit is contained in:
Mackenzie Clark
2019-03-01 13:16:32 -08:00
committed by GitHub
parent eed1c3b95b
commit bde2022b58
3 changed files with 28 additions and 21 deletions

View File

@ -33,7 +33,7 @@ impl Memory {
let protect = protection.to_protect_const();
let ptr = unsafe { VirtualAlloc(ptr::null_mut(), size, MEM_RESERVE | MEM_COMMIT, protect) };
let ptr = unsafe { VirtualAlloc(ptr::null_mut(), size, MEM_RESERVE, protect) };
if ptr.is_null() {
Err("unable to allocate memory".to_string())
@ -57,14 +57,7 @@ impl Memory {
let size = round_up_to_page_size(size, page_size::get());
let ptr = unsafe {
VirtualAlloc(
ptr::null_mut(),
size,
MEM_RESERVE | MEM_COMMIT,
PAGE_NOACCESS,
)
};
let ptr = unsafe { VirtualAlloc(ptr::null_mut(), size, MEM_RESERVE, PAGE_NOACCESS) };
if ptr.is_null() {
Err(MemoryCreationError::VirtualMemoryAllocationFailed(