内存750k文件大小,小于2 x 16000双阵列,1 x 16000 PointF阵列? [英] Out of Memory 750k file size, less than 2 x 16000 double arrays, 1 x 16000 PointF array?

查看:61
本文介绍了内存750k文件大小,小于2 x 16000双阵列,1 x 16000 PointF阵列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为我会尝试将一些托管和不变的数组放在main中的include文件中进行测试。程序编译但总是得到"内存不足"。 VC2013和VC2015的例外情况。在VC2008中编译并运行。我得到"Out
of Memory"文件大小为750k,小于2 x 16000双阵列,1 x 16000 PointF阵列。除了加载文件和逐步初始化(我之前已经做过)之外,这是否可以修复?一些示例数据如下所示:








 PointF (-94.793436,29.314074),
PointF(-94.798427,29.312416),
PointF(-94.804844,29.312105),
PointF(-94.810905,29.312623),
PointF( - 94.815659,29.312105),
PointF(-94.819105,29.312727),
PointF(-94.821957,29.313245),
PointF(-94.823146,29.316561),
PointF(-94.823264, 29.323918)};
数组< PointF> ^ aPF02 = gcnew数组< PointF>(15){
PointF(-94.830157,29.348367),
PointF(-94.828256,29.350232),
PointF(-94.826235,29.352304),
PointF(-94.825047,29.354686),
PointF(-94.820888,29.352925),
PointF(-94.819699,29.351786),
PointF(-94.81958,29.350232),
PointF(-94.820412,29.349092),
PointF(-94.821838,29.348264),






使用命名空间系统; 
使用命名空间System :: Drawing;

int main(数组< System :: String ^> ^ args)
{
#include" .. \\\ datata \ txrings.h"

Console :: WriteLine(" Hello World,adLongitude [784] = {0}",adLongitude [784] .ToString());
intiring = 29; int ipoint = 1;
Console :: WriteLine(" Hello World,aaPF [{0}] [{1}]。X = {2},aaPF [{3}] [{4}]。Y = {5}" ;,
iring.ToString(),ipoint.ToString(),(aaPF [iring] [ipoint] .X).ToString(),
iring.ToString(),ipoint.ToString(), (AAPF [iring] [的iPoint] .Y)的ToString());

返回0;
}



解决方案

有一些限制,尤其是if 使用预编译头文件。查看/ Zm选项。如果您正在使用它,也可以从预编译的标题列表中删除标题。


以下是有关这些编译器限制以及如何调整某些内容的一些信息。他们:


https://msdn.microsoft.com/en -us /库/ yz7kx3y2.aspx


I thought that I would try to put some managed and unchanging arrays inside an include file inside main to test. The program compiles but always gets an "Out of Memory" Exception on VC2013 and VC2015. Compiles and runs in VC2008. I get "Out of Memory" with a 750k file size, less than 2 x 16000 double arrays, 1 x 16000 PointF array. Is this something that can be fixed other than loading a file and initializing incrementally(which I already did before)? Some sample data looks like:

		PointF(-94.793436,29.314074),
		PointF(-94.798427,29.312416),
		PointF(-94.804844,29.312105),
		PointF(-94.810905,29.312623),
		PointF(-94.815659,29.312105),
		PointF(-94.819105,29.312727),
		PointF(-94.821957,29.313245),
		PointF(-94.823146,29.316561),
		PointF(-94.823264,29.323918) };
array <PointF> ^ aPF02=gcnew array<PointF>(15){ 
		PointF(-94.830157,29.348367),
		PointF(-94.828256,29.350232),
		PointF(-94.826235,29.352304),
		PointF(-94.825047,29.354686),
		PointF(-94.820888,29.352925),
		PointF(-94.819699,29.351786),
		PointF(-94.81958,29.350232),
		PointF(-94.820412,29.349092),
		PointF(-94.821838,29.348264),


using namespace System;
using namespace System::Drawing;

int main(array<System::String ^> ^args)
{
#include"..\data\txrings.h"
	
	Console::WriteLine("Hello World, adLongitude[784] = {0}", adLongitude[784].ToString());
	int iring = 29; int ipoint = 1;
	Console::WriteLine("Hello World, aaPF[{0}][{1}].X={2},aaPF[{3}][{4}].Y={5}",
		iring.ToString(), ipoint.ToString(), (aaPF[iring][ipoint].X).ToString(),
		iring.ToString(), ipoint.ToString(), (aaPF[iring][ipoint].Y).ToString());

	return 0;
}


解决方案

There are some limits, especially if using precompiled headers. Check out the /Zm option. You could also remove the header from the precompiled header list if you are using that.

Here's some info on these compiler limits and how to adjust some of  them:

https://msdn.microsoft.com/en-us/library/yz7kx3y2.aspx


这篇关于内存750k文件大小,小于2 x 16000双阵列,1 x 16000 PointF阵列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆