Fix segmentation fault

이 커밋은 다음에 포함됨:
2018-07-21 14:44:36 +02:00
부모 c79f1d26cc
커밋 d1b874b391
2개의 변경된 파일과 31개의 추가작업 그리고 32개의 파일을 삭제
-32
파일 보기
@@ -1,32 +0,0 @@
#include "ph7int.h"
#if defined(__WINNT__)
#include <Windows.h>
#else
#include <stdlib.h>
#endif
void *SyOSHeapAlloc(sxu32 nByte) {
void *pNew;
#if defined(__WINNT__)
pNew = HeapAlloc(GetProcessHeap(), 0, nByte);
#else
pNew = malloc((size_t)nByte);
#endif
return pNew;
}
void *SyOSHeapRealloc(void *pOld, sxu32 nByte) {
void *pNew;
#if defined(__WINNT__)
pNew = HeapReAlloc(GetProcessHeap(), 0, pOld, nByte);
#else
pNew = realloc(pOld, (size_t)nByte);
#endif
return pNew;
}
void SyOSHeapFree(void *pPtr) {
#if defined(__WINNT__)
HeapFree(GetProcessHeap(), 0, pPtr);
#else
free(pPtr);
#endif
}
+31
파일 보기
@@ -1,5 +1,36 @@
#if defined(__WINNT__)
#include <Windows.h>
#else
#include <stdlib.h>
#endif
#include "ph7int.h" #include "ph7int.h"
static void *SyOSHeapAlloc(sxu32 nByte) {
void *pNew;
#if defined(__WINNT__)
pNew = HeapAlloc(GetProcessHeap(), 0, nByte);
#else
pNew = malloc((size_t)nByte);
#endif
return pNew;
}
static void *SyOSHeapRealloc(void *pOld, sxu32 nByte) {
void *pNew;
#if defined(__WINNT__)
pNew = HeapReAlloc(GetProcessHeap(), 0, pOld, nByte);
#else
pNew = realloc(pOld, (size_t)nByte);
#endif
return pNew;
}
static void SyOSHeapFree(void *pPtr) {
#if defined(__WINNT__)
HeapFree(GetProcessHeap(), 0, pPtr);
#else
free(pPtr);
#endif
}
PH7_PRIVATE void SyZero(void *pSrc, sxu32 nSize) { PH7_PRIVATE void SyZero(void *pSrc, sxu32 nSize) {
register unsigned char *zSrc = (unsigned char *)pSrc; register unsigned char *zSrc = (unsigned char *)pSrc;
unsigned char *zEnd; unsigned char *zEnd;