i need fix err file no to ok > 2*G

i need fix err file no to ok > 2*G

1
2
3

I:\skynet091src_fixed\main.cpp : fatal error C1126: automatic allocation exceeds 2G



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

/** Remove a file from list with the given action
 *  id - file id
 *	action - action to perform
 *			 1 file to ok
 *			 2 file to incomplete
 *			 -1 file to incomplete if possible, else remove
 */


void file_remove(u32 id, int action)
{	file f;
	f.id = id;

	file_set::iterator i = fs.find(f);

	// move cursor away
	if(cursor == id) cursor_down();
	if(cursor == id) cursor_up();
	if(cursor == id) cursor = 0;


	if(action != 1 &&
		i->size >= incomplete_min_size &&
		(u64)segment_summ(i->seg) * 100 / i->size >= incomplete_percent)
	{	action = 2;
	}

	char n1[0x100];
	char n2[0x100];

	cache_close(i->h);

	snprintf(n1, sizeof(n1), "%s/%s", dir_temp, i->name.c_str());

	if(action == 0)
	{	// just close
	}
	else if(action == 1)
	{	snprintf(n2, sizeof(n2), "%s/%s", dir_ok, i->name.c_str());
		seg(*i, dir_temp, false);
		cache_move(n1, n2);
	}
	else if(action == 2)
	{	snprintf(n2, sizeof(n2), "%s/%s", dir_incomplete, i->name.c_str());
		seg(*i, dir_incomplete, true, true);
		seg(*i, dir_temp, false);
		cache_move(n1, n2);
	}
	else if(action == -1)
	{	seg(*i, dir_temp, false);
		cache_move(n1, ""); // unlink
	}

	ffs_remove(i->size, i->tag);
	fs.erase(i);
	sort_files();
}




http://ar.rghost.net/14235931



file no to ok > 2*G

??? What does this mean?

And the error looks like you are trying to make an array greater than 2GB. Why in the name of honor would you need that?

Yes, I want to make the program will move the file larger than 2 GB to file the completed
Last edited on
Move the file in fragments then. You can't get 2GB all at once. The compiler is simply not going to let you, as the error shows.
Thank you, my dear, I need to help you

What is the solution?
Is it impossible?
And especially I need to make it move files larger than 2 gigabytes to folder completed
Last edited on
What is the solution?

Zhuge already gave you the solution.
Full source code in this link can you give me the code development and ready...


http://ar.rghost.net/14235931

BOOST

http://www.opengle.com/boost_1_46_0-code.html
Last edited on
???????????????????????????????????????????????
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Who's next? :)
Topic archived. No new replies allowed.