Dynamicmemoryallocationisanicefunctionalitythat
isprovidedwithvirtuallyallPC-basedcompilers.How-
ever,notallmicrocontrollercompilershavesuchcapa-
bility,mostlikelyduetothelackofasophisticated
operatingsystemwithmemorymanagement.Although
mostapplicationsarestaticinnature,therearecases
whereaneedfordynamicallocationofmemory
resourcesexists.Examplesincludeanynumberofnet-
workprotocolsthathaveadynamicallyspecified
nature.Thisapplicationnotepresentsasimpleandeffi-
cientmethodfordynamicmemoryallocationwithout
theneedofanoperatingsystem.AN914DynamicMemoryAllocationfortheMPLABC18CCompilerAuthor:RossM.FoslerFIGURE1:SIMPLEHEAPEXAMPLEMicrochipTechnologyIncorporatedAllocationBitSegmentLength/ReferenceINTRODUCTIONSegment1DynamicmemoryallocationisanicefunctionalitythatisprovidedwithvirtuallyallPC-basedcompilers.How-ever,notallmicrocontrollercompilershavesuchcapa-bility,mostlikelyduetothelackofa
暂无评论