summaryrefslogtreecommitdiff
path: root/ldmicro/lib/linuxUI/linuxLD.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ldmicro/lib/linuxUI/linuxLD.cpp')
-rw-r--r--ldmicro/lib/linuxUI/linuxLD.cpp90
1 files changed, 0 insertions, 90 deletions
diff --git a/ldmicro/lib/linuxUI/linuxLD.cpp b/ldmicro/lib/linuxUI/linuxLD.cpp
index 9fa63c9..e43ed70 100644
--- a/ldmicro/lib/linuxUI/linuxLD.cpp
+++ b/ldmicro/lib/linuxUI/linuxLD.cpp
@@ -32,111 +32,21 @@ size_t max(size_t A, size_t B)
LPVOID HeapAlloc(HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes)
{
- // if (hHeap == NULL)
- // {
- // printf("Alloc**********NULL HEAP***************\n");
LPVOID p = malloc(dwBytes);
return p;
- // }
-
- // auto it = std::find_if(HeapRecords.begin(), HeapRecords.end(), [&hHeap](HEAPRECORD &Record) { return Record.hHeap == hHeap; });
-
- // if (it == HeapRecords.end())
- // return NULL;
-
- // if ((*it).dwAllocatedSizeOffset + dwBytes > (*it).dwSize)
- // {
- // if ((*it).dwMaximumSize != 0)
- // if((*it).dwAllocatedSizeOffset + dwBytes > (*it).dwMaximumSize)
- // return NULL;
-
- // (*it).hHeap = realloc((*it).hHeap, (*it).dwAllocatedSizeOffset + dwBytes);
- // hHeap = (*it).hHeap;
- // }
-
- // /// HEAP_ZERO_MEMORY is set by default
- // DWORD flags = MAP_ANONYMOUS;
-
- // // if ( !((dwFlags & HEAP_ZERO_MEMORY) == HEAP_ZERO_MEMORY) )
- // // flags = MAP_ANONYMOUS | MAP_UNINITIALIZED;
-
- // /* Use for setting a meamory chunck with some value
- // * void * memset ( void * ptr, int value, size_t num );
- // */
- // LPVOID p = mmap(hHeap + (*it).dwAllocatedSizeOffset, dwBytes, PROT_EXEC, flags, -1, 0);
-
- // if (p == NULL)
- // return NULL;
-
- // (*it).dwAllocatedSizeOffset += dwBytes;
- // HEAPCHUNCK chunck;
- // chunck.Chunck = p;
- // chunck.dwSize = dwBytes;
- // (*it).Element.push_back(chunck);
-
- // return p;
}
BOOL HeapFree(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem)
{
- /// if NULL free()
- // if (hHeap == NULL)
- // {
- // printf("free*********NULL HEAP***************\n");
free(lpMem);
return TRUE;
- // }
- // auto heap_it = std::find_if(HeapRecords.begin(), HeapRecords.end(), [&hHeap](HEAPRECORD &Record) { return Record.hHeap == hHeap; });
-
- // if (heap_it == HeapRecords.end())
- // return FALSE;
-
- // auto chunck_it = std::find_if((*heap_it).Element.begin(), (*heap_it).Element.end(), [&lpMem](HEAPCHUNCK &Chunck) { return Chunck.Chunck == lpMem; });
-
- // if (chunck_it == (*heap_it).Element.end())
- // return FALSE;
-
- // int result = munmap((*chunck_it).Chunck, (*chunck_it).dwSize);
-
- // if (result == 0)
- // {
- // (*heap_it).Element.erase(chunck_it);
- // return TRUE;
- // }
- // else
- // return FALSE;
-
}
-/*HICON LoadImage(HINSTANCE hinst, LPCTSTR lpszName, UINT uType, int cxDesired,
- int cyDesired, UINT fuLoad)
-{
- HICON pixbuf;
- GError *error = NULL;
- pixbuf = gdk_pixbuf_new_from_file(lpszName, &error);
-
- if(!pixbuf) {
- fprintf(stderr, "%s\n", error->message);
- g_error_free(error);
- }
-
- return pixbuf;
-}*/
-
-
void OutputDebugString(char* str)
{
}
-/*double GetTickCount(void)
-{
-// timespec now;
-// clock_gettime()
-// if (clock_gettime(CLOCK_MONOTONIC, &now))
-// return 0;
- return 10.2;//now.tv_sec * 1000.0 + now.tv_nsec / 1000000.0;
-}*/
double GetTickCount(void)
{
timespec now;