Now that the memory management model has changed (ARC removed) in C++ Builder 10.4, I need to check my app for memory leaks. My research has revealed several tools for apps that run on Windows but not on Android.
I am testing my 32 bit app on Android 10.
Thanks in advance for any possibilities!
You could compile your application in windows and use the tools of your research.
I've a number of rather old in-proc ATL COM servers, formerly built using VC++ 2005.
Now these projects were ported to VC++ 2015.
Since I need to support legacy Win XP systems, platform toolset is "VS 2015 - Windows XP". Also, according to this issue, /Zc:threadSafeInit- compiler option is set.
All of servers are written using ATL attributes, there are something like this in each project:
[module(dll, uuid = "{E49F47F5-C0E2-4C1D-8C66-BF8AE6DDF5A1}",
name = "MyLib",
helpstring = "MyLib 1.0 Type Library",
resource_name = "IDR_MYLIB")]
class CMyLibModule
{
public:
// Override CAtlDllModuleT members
};
The problem.
All these projects runs fine on WinXP Pro. But when I try to register them on XP Embedded machine, I get 0xC000001D error code on LoadLibrary call.
How can I fix/diagnose this error?
P.S. If this makes sense, XP embedded system is built on top AMD Geode processor, while XP Pro system is on top of regular Intel processor.
I've figured out, what's the problem.
The issue is in combination of Geode processor and instruction set used by VC++ compiler by default - SSE2 for x86 projects. This works on modern and/or "mature" processors, but fails on Geode.
After changing this option to SSE, everything works fine:
I'm dealing with a large single text file (1.5 GB).
I have a machine with 16 GB memory, but Xamarin Studio only allows me to compile things into 32-bit executables. So my 16 GB memory could not me utilized fully.
So my question is, how do I compile my code into 64-bit programs in Xamarin Studio in OS X? Are there other ways to break this memory limit set by mono for each process?
Thanks.
You can't yet compile to 64bit or use 64bit native libraries with Xamarin.Mac unfortunately, it's still 32bit only, they are apparently working on it though.
Xamarin announced the Unified API 32/64 bit for Mac and iOS back in 8/19/2014, so the answer is now: yes.
Assuming you have a installed a 64-bit Mono (& compiler) framework on OS-X as the default install is still 32-bit in order to support GTK# applications. Within Xamarin studio you can change the Mono framework SDK to your 64-bit version that is being used to compile/run.
I've a problem with a library developed in Visual C++ with Cuda.
I want to use my dll on different computers, all with NVIDIA drivers, but it depends
by CUDART32_42_9.DLL and CUBLAS32_43_9.DLL; so, depending on 32_42_9, it doesn't work with any different cuda version: neither inferiror (that is reasonable) nor superior (that is my problem).
Have you got any suggestion about how to solve the problem? Do I have to deploy my library with CUDART32_42_9.DLL and CUBLAS32_43_9.DL attached?
Thank you!
It is the responsibility of the application developer to redistribute the necessary CUDA libraries with the application. The EULA.txt document in the CUDA Toolkit doc directory has a section Attachment A that defines Redistributable Software. Redistributable software includes but is not limited to cudart* and cublas*. See EULA.txt for more details.
The end user will need to download a compliant version of the NVIDIA graphics driver for their platform.
We are getting new dev machines and moving up to Vista 64 Ultimate to take advantage of our 8gb ram. Our manager wants us to do all dev in 32bit virtual machines to make sure there will be no problems with our code moving into production.
Is there any way to guarantee the resultant programs will work on 32bit os's?
I don't mind using virtual machines, but I don't like how they force you back into a "Single" monitor type view. I like moving my VS toolbars off to my other monitor.
EDIT: We are using Visual Studio 2005 and 2008, VB.NET and/or C#
EDIT: Using Harpreet's answer, these are the steps I used to set my Visual Studio IDE to compile x86 / 32bit:
Click Build and open Configuration Manager
Select Active Solution Platform drop down list
Select x86 if it is in the list and skip to step 5, if not Select <New...>
In the New Solution Platform dialog, select x86 and press OK
Verify the selected platform for all of your projects is x86
Click Close.
Enjoy.
Thank you,
Keith
I do development on 64 bit machines for 32 bit Windows. It's not a problem. You should make sure that your projects are set to compile in x86 mode in order to be conservative. You'll want to go through each project in the solution and double check this. You could also use the AnyCPU setting but that's a little riskier since it will run differently on your dev machine than a 32 bit machine. You want to avoid the 64bit mode, of course.
The problems I've run into are drivers that don't work when the app is compiled for 64 bit (explicitly 64 bit or AnyCPU compiled and running on 64 bit Windows). Those problems are completely avoidable by sticking with x86 compilation. That should reveal all flaws on your dev machines.
Ideally, you could set up a build and test environment that could be executed against frequently on a 32 bit machine. That should reassure your management and let you avoid the VM as your desktop.
As long as you compile your executables as 32 bit, they will run on both 32 bit and 64 Windows machines (guaranteed). Using 64 dev machines has the advantage that you can start testing your code with 64 bit compilation (to check for things like pointers casted to 32 bit integers), this way making the transition to 64 bit easier in the future (should you your company choose to do a 64 bit version).
Compiling for a 64bit OS is an option in the compiler. You can absolutely compile to a 32bit exe from within Vista 64 bit. When you run the app, you can then see in the TaskManager that there is a "*32" next to the process...this means it's 32bit ;)
I believe your managers need some more education on what 64bit OS really means :)
Not an answer to your question, but possibly a solution to your problem: VirtualBox (and probably others) supports "seamless integration" mode, which just gives you a second start bar and lets you drag windows around freely.
Also, and this is an answer to your question, it depends on your compile settings. You can compile for different environments, and you can perfectly compile 32-bit programs on a 64-bit system with Visual Studio. Can't tell you how, but I'm sure some Visual Studio guru could help you out.
We develop a 32-bit application using VS 2005 (2008 soon) and have just purchased some new machines with XP Pro x64 or Vista Business 64-bit on them so that we can take advantage of the extra RAM whilst holding a watching brief on the possibility of doing a 64-bit port if it becomes commercially necessary to do so. We haven't had any problems with doing this other than tweaking some scripts in our development environment etc.
Those developers who weren't included in this upgrade cycle still use 32-bit machines, so these should pick up problems when the unit tests and the application test suite are run as a matter of course before a check-in.
What we also do is to make sure that we have a set of "test build" machines made up of "typical" configurations (XP/Vista, 2/4/8 cores, etc.) that build and test sets of check-ins - we have various different test suites for stability, performance, etc. - before they are added to the integration area proper. Again, these haven't picked up any problems with running a 32-bit application built on a 64-bit OS.
Anyway, as others have already said, I wouldn't expect it to be a problem because it's the compiler that generates the appropriate code for the target OS regardless of the OS that the compiler is actually running on.
yeah, like adam was saying. There's 3 options: MSIL (default), x64, and x86. You can target x64 and it will generate dll's specifically for 64-bit systems, or you can do x86 which will run on 32-bit and 64-bit, but will have the same restrictions as 32-bit on a 64-bit system.
MSIL will basically let the JITer issue the platform specific instruction (at a slight performance penalty compared to a native image)
EDIT: no language, so i'm talking about .net framework languages like vb.net and c#, c++ is a completely different animal.
Found this today:
http://www.brianpeek.com/blog/archive/2007/11/13/x64-development-with-net.aspx
x64 Development with .NET
Earlier this year I made the switch to a 64-bit operating system - Vista Ultimate x64 to be exact. For the most part, this process has been relatively painless, but there have been a few hiccups along the way (x64 compatible drivers, mainly, but that's not the point of this discussion).
In the world of x64 development, there have been a few struggling points that I thought I'd outline here. This list will likely grow, so expect future posts on the matter.
In the wonderful world of .NET development, applications and assemblies can be compiled to target various platforms. By default, applications and assemblies are compiled as Any CPU in Visual Studio. In this scenario, the CLR will load the assembly as whatever the default target is for the machine it is being executed on. For example, when running an executable on an x64 machine, it will be run as a 64-bit process.
Visual Studio also provides for 3 specific platform targets: x86, x64 and Itanium (IA-64). When building an executable as a specific target, it will be loaded as a process of that type. For example, an x86-targeted executable run on an x64 machine will run as a 32-bit process using the 32-bit CLR and WOW64 layer. When assemblies are loaded at runtime, they can only be loaded by a process if their target matches that of the hosting process, or it is compiled as Any CPU. For example, if x64 were set as the target for an assembly, it can only be loaded by an x64 process.
This has come into play in a few scenarios for me:
XNA - XNA is available as a set of 32-bit assemblies only. Therefore, when referencing the XNA assemblies, the executable/assembly using them must be targeted to the x86 platform. If it is targeted as x64 (or as Any CPU and run on a 64-bit machine), an error will be thrown when trying to load the XNA assemblies.
Microsoft Robotics Studio - The XInputGamepadService uses XNA internally to talk to the Xbox 360 controller. See above.
Managed DirectX - While this is already deprecated and being replaced with XNA, it still has its uses. The assemblies are not marked for a specific target, however I had difficulty with memory exceptions, especially with the Microsoft.DirectX.AudioVideoPlayback assembly.
Phidgets - Depending on what library you download and when, it may or may not be marked as 32-bit only. The current version (11/8/07) is marked as such, and so requires a 32-bit process to host it.
The easiest way to determine if an executable or assembly is targeted to a specific platform is to use the corflags application. To use this, open a Visual Studio Command Prompt from your Start menu and run it against the assembly you wish to check.
The easiest way to determine if an executable or assembly is targeted to a specific platform is to use the corflags application. To use this, open a Visual Studio Command Prompt from your Start menu and run it against the assembly you wish to check.