Discussion:
メモリの低断片化HeapSetInformation関数について
(too old to reply)
2009-11-20 22:42:08 UTC
Permalink
$B$$$D$bGRFI$5$;$F$$$?$@$$$F$*$j$^$9!#(B
$B8=:_!"(BHeaoAlloc$B4X?t$GF0E*$K%a%b%j$r3NJ]$7!"MxMQ2DG=J*M}%a%b%j$.$j$.$j$^$G(B
$B%G!<%?$r%a%b%j$KC_$($k(BPG$B$r:***@.$7$F$$$^$9!#(B
$B%M%C%H$G$3$N7o$K$D$$$FD4$Y$F$$$k$H(BHeapSetInformation$B4X?t$H$$$&$b$N$,$"$k(B
$B$H$7$j$^$7$?!#(BLFH$B5!G=$H$$$&$b$N$i$7$$$N$G$9$,!#$&$^$/F0$$$F$/$l$^$;$s!#(B

$B%=!<%9$O!"(BMain$B4X?t$N:G=i$K(BMSDN$B$N%I%-%e%a%s%H$I$*$j(B

ULONG ulEnableLFH = 2;
if (HeapSetInformation(GetProcessHeap(), HeapCompatibilityInformation,
$B!!!!!!!!!!(B&ulEnableLFH,sizeof(ulEnableLFH)))
{
printf("Success!\n");
}
else{
printf("Failure (%d)\n", GetLastError());
}

$B$H=q$$$F%3%s%Q%$%k$7$^$7$?!#(B
$B$7$+$7!"<:GT$7!"(BGetLastError$B$G(B31$B$,JV$C$F$-$^$9!#(B
$B$$$m$s$J(BPC$B$G$bF1$8>uBV$G$9!#(B
$B3+H/4D6-$O(BVS2005SP1$B!"(BOSWindowsXPSP3$B$G$9!#(B
$B$J$K$+(BOS$B$***@_Dj$,$$$k$N$G$7$g$&$+!)(B
UETA, Shin-ichi
2009-11-21 03:03:39 UTC
Permalink
$B$3$s$K$A$O!"?"ED$G$9!#(B
Post by
$B%=!<%9$O!"(BMain$B4X?t$N:G=i$K(BMSDN$B$N%I%-%e%a%s%H$I$*$j(B
$B!A(B
Post by
$B$H=q$$$F%3%s%Q%$%k$7$^$7$?!#(B
$B$7$+$7!"<:GT$7!"(BGetLastError$B$G(B31$B$,JV$C$F$-$^$9!#(B
$B$$$m$s$J(BPC$B$G$bF1$8>uBV$G$9!#(B
$B3+H/4D6-$O(BVS2005SP1$B!"(BOSWindowsXPSP3$B$G$9!#(B
VS2005$B$N%I%-%e%a%s%H$G$O$J$/!":G?7$N%j%U%!%l%s%9$r$4Mw$/$@$5$$!#(B

HeapSetInformation Function
http://msdn.microsoft.com/en-us/library/aa366705%28VS.85%29.aspx

$B$3$l$K$h$k$H!"(BHEAP_NO_SERIALIZE$B$***@_Dj$7$?%R!<%W!"8GDj%5%$%:$N%R!<%W!"(B
$B$^$?$O%G%P%C%,$r;HMQ$7$F$$$k>l9g$O(BLFH$B$rM-8z2=$G$-$J$$$H$"$j$^$9!#(B
$B$=$NE@$O$$$+$,$G$7$g$&$+(B?
$B%G%P%C%,$N;HMQ$,1F6A$7$F$$$k>l9g$O4D6-JQ?t(B _NO_DEBUG_HEAP $B$r(B 1 $B$K(B
$***@_Dj$9$k$H2sHr$G$-$k$_$?$$$J$N$G;n$7$F$_$F$O(B?

# $B;n$7$?$3$H$O$J$$$N$G8z2L$N$[$I$OJ,$+$j$^$;$s$1$I!J6l>P!K(B
--
$B?"ED%7%9%F%`@_7W;vL3=j(B
Ueta System Design Studio
http://www.usdesign.jp/
$B?"ED??0l(B
mailto:***@usdesign.jp
koji
2009-11-23 06:43:11 UTC
Permalink
$B?"EDMM(B

$B$4JVEz$"$j$,$H$&$4$6$$$^$9!#(B
$B62$lF~$j$^$9!#(B
Post by UETA, Shin-ichi
$B$^$?$O%G%P%C%,$r;HMQ$7$F$$$k>l9g$O(BLFH$B$rM-8z2=$G$-$J$$$H$"$j$^$9!#(B
GetProcessHeap$B$G<hF@$7$?%O%s%I%k$G(BGetProcessHeap$B$r<B9T$7!"(B
$B$=$N8e!"(BHeapAlloc$B4X?t$GF1%5%$%:$N%a%b%j3NJ]$r(Bloop$B$G$7$F$$(B
$B$/$H$$$&;H$$J}$r$7$F$$$^$9!#(B
$B$3$NJ}K!$G!"DcCGJR2=$5$l$F$$$k$+$o$+$i$J$$$N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GDj$5$l$F$$$k$H(BLFH$B$r8zN($h$/4IM}$G$-(B
$B$J$$$+$i$G$7$g$&$M!#(B
--
$B?"ED%7%9%F%`@_7W;vL3=j(B
Ueta System Design Studio
http://www.usdesign.jp/
$B?"ED??0l(B
mailto:***@usdesign.jp
2009-11-25 13:50:46 UTC
Permalink
$B?"EDMM(B

$B$4JVEz62$lF~$j$^$9(B
$BJY6/$K$J$j$^$9(B

$B0J>e(B
Post by UETA, Shin-ichi
$B$I$&$b!"?"ED$G$9!#(B
Post by koji
$B8GDj%5%$%:$H$$$&$N$O!"$3$N$h$&$J;H$$J}$J$N$G$7$g$&$+!)(B
HeapCreate$B$G>e8B%5%$%:$r;XDj$7$?>l9g$N%W%i%$%Y!<%H%R!<%W$r(B
$B;X$9$h$&$G$9!#%5%$%:$,8GDj$5$l$F$$$k$H(BLFH$B$r8zN($h$/4IM}$G$-(B
$B$J$$$+$i$G$7$g$&$M!#(B
--
Ueta System Design Studio
http://www.usdesign.jp/
$B?"ED??0l(B
Loading...