Click here to Skip to main content
15,897,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to put blank line in Excel Pin
David Crow19-Sep-07 6:55
David Crow19-Sep-07 6:55 
GeneralRe: how to put blank line in Excel Pin
tunminhein23-Sep-07 11:54
tunminhein23-Sep-07 11:54 
Question_aligned_malloc Problem! Pin
bosfan19-Sep-07 0:18
bosfan19-Sep-07 0:18 
AnswerRe: _aligned_malloc Problem! Pin
toxcct19-Sep-07 0:34
toxcct19-Sep-07 0:34 
GeneralRe: _aligned_malloc Problem! Pin
bosfan19-Sep-07 0:49
bosfan19-Sep-07 0:49 
GeneralRe: _aligned_malloc Problem! Pin
Matthew Faithfull19-Sep-07 1:03
Matthew Faithfull19-Sep-07 1:03 
GeneralRe: _aligned_malloc Problem! Pin
bosfan19-Sep-07 1:08
bosfan19-Sep-07 1:08 
AnswerRe: _aligned_malloc Problem! Pin
Matthew Faithfull19-Sep-07 1:31
Matthew Faithfull19-Sep-07 1:31 
Hmm I'm confused now, The message that turned up in my email is not the message you posted here?!?

Hi,
i change the original line with _aligned_malloc:
pListHead = (PSLIST_HEADER)_aligned_malloc(sizeof(SLIST_HEADER), MEMORY_ALLOCATION_ALIGNMENT);
to:
pListHead = (PSLIST_HEADER)malloc(MEMORY_ALLOCATION_ALIGNMENT);

and i dont have errors! [confused]

regards
termal


Anyway you'll need to change that to
pListHead = (PSLIST_HEADER)malloc( sizeof(SLIST_HEADER) );
or you certainly will get errors when you run it. The original problem may be that _aligned_malloc is no longer exported from the Visual C Runtime, or it might require you to add an addtional include over and above memory.h e.g. #include <dbg.h> from the C Library source. Either way I wouldn't recommend calling _aligned_malloc directly from your code as it's intended to be an internal function. It will get called from malloc anyway, at least in debug mode, several levels down. If you installed the C Library source code along with VC++ 6 you can step into the malloc call in the debugger and marvel at the amount of stuff that happens just to get you a few bytes of memory to play with. Enjoy.



Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: _aligned_malloc Problem! Pin
bosfan19-Sep-07 3:06
bosfan19-Sep-07 3:06 
AnswerRe: _aligned_malloc Problem! Pin
Randor 19-Sep-07 1:39
professional Randor 19-Sep-07 1:39 
GeneralRe: _aligned_malloc Problem! Pin
bosfan19-Sep-07 3:09
bosfan19-Sep-07 3:09 
QuestionTab Control Related problem Pin
Y_Kaushik18-Sep-07 23:55
Y_Kaushik18-Sep-07 23:55 
AnswerRe: Tab Control Related problem Pin
nbugalia19-Sep-07 0:20
nbugalia19-Sep-07 0:20 
GeneralRe: Tab Control Related problem Pin
Y_Kaushik19-Sep-07 0:47
Y_Kaushik19-Sep-07 0:47 
GeneralRe: Tab Control Related problem Pin
nbugalia19-Sep-07 1:01
nbugalia19-Sep-07 1:01 
GeneralRe: Tab Control Related problem Pin
Y_Kaushik19-Sep-07 1:07
Y_Kaushik19-Sep-07 1:07 
QuestionRe: Tab Control Related problem Pin
David Crow19-Sep-07 2:50
David Crow19-Sep-07 2:50 
AnswerRe: Tab Control Related problem Pin
Nelek19-Sep-07 2:41
protectorNelek19-Sep-07 2:41 
AnswerRe: Tab Control Related problem Pin
David Crow19-Sep-07 2:57
David Crow19-Sep-07 2:57 
Questiondon't understand MSDN explanations. Can someone explain this? Pin
Nelek18-Sep-07 23:23
protectorNelek18-Sep-07 23:23 
AnswerRe: don't understand MSDN explanations. Can someone explain this? Pin
toxcct18-Sep-07 23:35
toxcct18-Sep-07 23:35 
GeneralDidn't explain myself good Pin
Nelek19-Sep-07 0:35
protectorNelek19-Sep-07 0:35 
GeneralRe: Didn't explain myself good Pin
toxcct19-Sep-07 1:49
toxcct19-Sep-07 1:49 
GeneralRe: Didn't explain myself good Pin
Nelek19-Sep-07 2:08
protectorNelek19-Sep-07 2:08 
QuestionRe: don't understand MSDN explanations. Can someone explain this? Pin
David Crow19-Sep-07 3:04
David Crow19-Sep-07 3:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.