search for: getcurrentprocess

Displaying 20 results from an estimated 23 matches for "getcurrentprocess".

2012 Jan 07
3
[LLVMdev] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...est.c (revision 147731) +++ test/Unit/clear_cache_test.c (working copy) @@ -11,12 +11,20 @@ #include <stdio.h> #include <string.h> #include <stdint.h> +#if defined(_WIN32) +#include <windows.h> +void __clear_cache(void* start, void* end) +{ + if( !FlushInstructionCache(GetCurrentProcess(), start, end-start) ) + exit(1); +} +#else #include <sys/mman.h> +extern void __clear_cache(void* start, void* end); +#endif -extern void __clear_cache(void* start, void* end); - typedef int (*pfunc)(void); int func1() @@ -31,14 +39,23 @@ -unsigned char execution_buf...
2008 May 18
2
A problem with GetProcessMemoryInfo?
...ine? Any advice is appreciated :) /* result under windows: { } [successed: 1085440]{ } result under wine(linux): { } [successed: 0]{ */ #include <windows.h> #include "psapi.h" #include <stdio.h> #include <stdlib.h> #pragma comment ( lib, "psapi.lib" ) void GetCurrentProcessMemory () { PROCESS_MEMORY_COUNTERS pmc; printf("{\n}"); bool ret=GetProcessMemoryInfo ( GetCurrentProcess() , &pmc, sizeof ( pmc ) ); if (ret) printf("\n[successed: %d]", (int)pmc.WorkingSetSize); else printf("\n<failed>"); printf("{\n}&...
2007 Nov 18
4
Need help with win32-service, failure actions
Hi all, I''m trying to get failure action support working. I''ve modified the Service.configure method to accept the following options: failure_reset_period failure_command failure_reboot_message failure_actions failure_delay I''ve got the failure_command and failure_reboot message working, but the rest aren''t working properly. I''m mostly focused on
2012 Jan 07
1
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...est.c (revision 147731) +++ test/Unit/clear_cache_test.c (working copy) @@ -11,11 +11,20 @@ #include <stdio.h> #include <string.h> #include <stdint.h> +#if defined(_WIN32) +#include <windows.h> +void __clear_cache(void* start, void* end) +{ + if( !FlushInstructionCache(GetCurrentProcess(), start, end-start) ) + exit(1); +} +#else #include <sys/mman.h> +extern void __clear_cache(void* start, void* end); +#endif -extern void __clear_cache(void* start, void* end); typedef int (*pfunc)(void); @@ -38,7 +47,15 @@ // make executable the page containing execu...
2020 Nov 10
1
unusual use of getenv
...s a Windows thing. It first occurred in > 1c5b428ff8234cef705bf57bc1418deb4db25c83 (SVN r23921) when Windows > support was not yet a thing. I concluded this was a windows thing because the origin of the code seems to be in 00d5508496c1ec0540da5714b0ed66e64b623df5 which uses the windows only `GetCurrentProcess` instead of `getenv`. Chris Lattner then changed it to use `getenv` in 63e504ff437d88f0d4bdb0cd50b045655dea6ab1 (svn r23915). 00d550849 is svn r19307 and predates 1c5b428ff823 by ~9 months. The "new header" patch you identified as the origin of this code seems to be a copy of the original...
2012 Jan 07
0
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
Hi Ruben, > I see I missed some curly braces. I also modified spacing a tiny bit. Doesn't seem so. E.g. you have: + if ( !VirtualQuery(addr, &b, sizeof(b)) ) + exit(1); + if( !VirtualProtect(b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, &b.Protect) ) Add space after "if". Do not put spaces after "(" and before ")". Same for other
2012 Jan 07
2
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...est.c (revision 147738) +++ test/Unit/clear_cache_test.c (working copy) @@ -11,11 +11,20 @@ #include <stdio.h> #include <string.h> #include <stdint.h> +#if defined(_WIN32) +#include <windows.h> +void __clear_cache(void* start, void* end) +{ + if (!FlushInstructionCache(GetCurrentProcess(), start, end-start)) + exit(1); +} +#else #include <sys/mman.h> +extern void __clear_cache(void* start, void* end); +#endif -extern void __clear_cache(void* start, void* end); typedef int (*pfunc)(void); @@ -38,21 +47,29 @@ // make executable the page containing execu...
2019 Sep 12
2
Questions after completed Kaleidoscope Chapter 1
...them, So ORC can find them at runtime in one of the JITDylibs. It would be helpful to know what you tried? (please attach code lines). For question 2: I guess you might be missing to link libraries that your program depend on, you can do that via setting up your dynamiclibrary search generator or getCurrentProcess symbols. Plus, Why do you want to hide them, it is an error? For question 3: Currently, every symbol whether it is added via generator or not, must be defined in a JITDylib. It is more of a design choice, it makes implementation and resolution logic much easier within ORC. Thanks Praveen On Thu...
2009 Jan 22
2
wine for linux and Mac the same or different? (problem)
Hello preface: sorry for my english, but that is not my native language... I want to have a nice photo editor running named FiXfoto. (a Shareware-Download can be found is here: german shareware = http://www.j-k-s.com/stats/getfile.php?id=41 ) There is a english shareware version too, but i didnt tried it. Normally i use Mac Osx and want to use it there. I can install this application
2009 Mar 01
0
Re: A problem with GetProcessMemoryInfo?
I modified code to: #include <windows.h> #include "psapi.h" #include <stdio.h> #include <stdlib.h> #pragma comment ( lib, "psapi.lib" ) void GetCurrentProcessMemory () { PROCESS_MEMORY_COUNTERS pmc; printf("{\n}"); bool ret=GetProcessMemoryInfo ( GetCurrentProcess() , &pmc, sizeof ( pmc ) ); if (ret) printf("\n[successed: %d]", (int)pmc.WorkingSetSize); else printf(&q...
2001 Nov 23
0
eval.c: possible issue with profiling for Windows
I see a possible problem with the "wait" parameter for the profiler thread: static void R_InitProfiling(char * filename, int append, double dinterval) { int wait; Here is the (automatic) variable. HANDLE Proc = GetCurrentProcess(); .......... wait = interval/1000; if(!(ProfileEvent = CreateEvent(NULL, FALSE, FALSE, NULL)) || (_beginthread(ProfileThread, 0, &wait) == -1)) Here the address of wait is given to the thread R_Suicide("unable to create profiling thread"); R_Profiling = 1; Here...
2011 May 26
1
How to resolve conflicts between Cocoa and WineLib...?!
...ation in a Cocoa application [Embarassed] I think I can probably solve the problem by creating a C++ code only Cocoa framework and linking it with WineLib and my application, but surely there is a better solution for this problem... [Question] winbase.h:1608: error: conflicting types for 'GetCurrentProcess' winbase.h:1609: error: conflicting types for 'GetCurrentThread' winbase.h:1877: error: conflicting types for 'LoadResource' wingdi.h:3345: error: conflicting types for 'AnimatePalette' wingdi.h:3440: error: conflicting types for 'EqualRgn' wingdi.h:3452: error:...
2004 Jul 15
1
getWindowsHandle()
I notice that this function is available after Dr. Murdoch's post at R-GUI. I am further wondering how to use "Process" and "ProcessID" two choices. Suppose I created more than one 'Document' windows within MDI. I need to find their corresponding process ID or handle, in order to communicate with them correctly. Regards, Peng
2008 Feb 21
1
[LLVMdev] Is there someone tried LLVM 2.1 on Visual Studio 2005?
...tried LLVM 2.1 on Visual Studio 2005? >To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > >Hi there, > >Did anyone try VS2008/Vista? There would a compile error (LLVM >2.1/2.2) at Line 126 in the file DynamicLibrary.inc. >// EnumerateLoadedModules(GetCurrentProcess(), ELM_Callback, 0); >Maybe MS changed the parameter type in the latest platform SDK. > >A simple workaround. At line 47 in the same file DynamicLibrary.inc, >// static BOOL CALLBACK ELM_Callback(PSTR ModuleName, ... >change PSTR to PCSTR, and everything is OK. > >I don't...
2009 Aug 24
2
Number of CPU's
Any way to get access to the number of CPU's, optionally their type, from within R? In linux I can just read /proc/cpuinfo but for win/mac ? Thanks! H?vard -- H?vard Rue Department of Mathematical Sciences Norwegian University of Science and Technology N-7491 Trondheim, Norway Voice: +47-7359-3533 URL : http://www.math.ntnu.no/~hrue Fax : +47-7359-3524 Email: havard.rue
2001 Oct 16
7
Performance tests
I did some testing of vorbis codec (Winamp plugin) on a Pentium 166 MMX, and found that the performance is pretty good. I got 3 % cpu utisization if I turned dithering off, and 5 % otherwise. This was with a 138 kbit song. It's pretty long to mp3 performance that was 0 to 1 % on that machine for a 128 kbit song. Also vorbis seems to have a larger working set, because if I play two songs at
2008 Nov 22
2
GetFinalPathNameByHandle for XP and earlier
...pmem = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 1) if pmem begin buf = 0.chr * MAXPATH # Buf will contain the full path, but with the device name instead # of the drive letter that we ultimately want. if GetMappedFileName(GetCurrentProcess(), pmem, buf, MAXPATH) > 0 buf.strip! dbuf = 0.chr * 512 # Get a list of logical devices if GetLogicalDriveStrings(dbuf.size, dbuf) > 0 devices = dbuf.split("\0") devices.delete_if...
2017 Jan 26
2
compiler-rt linux-arm builtins/clear_cache.c depends on kernel headers
...a patch to just place the #define inline. I'm not a member of the list so please CC me on replies. diff --git a/lib/builtins/clear_cache.c b/lib/builtins/clear_cache.c index 4c2ac3b..191598d 100644 --- a/lib/builtins/clear_cache.c +++ b/lib/builtins/clear_cache.c @@ -82,10 +82,6 @@ uintptr_t GetCurrentProcess(void); #endif #endif -#if defined(__linux__) && defined(__arm__) - #include <asm/unistd.h> -#endif - /* * The compiler generates calls to __clear_cache() when creating * trampoline functions on the stack for use with nested functions. @@ -108,6 +104,7 @@ void __clear_cache(...
2008 Feb 12
3
[LLVMdev] Is there someone tried LLVM 2.1 on Visual Studio 2005?
Hello all, Is there anyone has tried LLVM 2.1 on Visual Studio 2005? I did but not succeed due to some build errors. I seem to remember I read somewhere on this list it's compiled on VS2005 so I wonder... Have a good night. Thx, Seung
2019 Sep 12
2
Questions after completed Kaleidoscope Chapter 1
Hello there, I finished Chapter 1 of the Kaleidoscope tutorial for using the Orc JIT API. I played around with some things and ended with some questions. 1. What is the use of "MangleAndInterner"? I read it is used to mangle the name for the lookup search, but I seem to be not able to use it correctly. In my first attempt I used the mangled name of my function