Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > SSR_impls > SSR__MC_shared_impl
changeset 28:b37c38418637 DistributedMalloc
changed memory allocation to distributed version
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Thu, 22 Sep 2011 12:01:22 +0200 |
| parents | 2c146b6b3890 |
| children | dcbfe2bc8929 |
| files | SSR_PluginFns.c SSR_Request_Handlers.c SSR_Request_Handlers.h SSR_lib.c |
| diffstat | 4 files changed, 8 insertions(+), 29 deletions(-) [+] |
line diff
1.1 --- a/SSR_PluginFns.c Mon Aug 29 14:17:43 2011 +0200 1.2 +++ b/SSR_PluginFns.c Thu Sep 22 12:01:22 2011 +0200 1.3 @@ -85,7 +85,11 @@ 1.4 default: 1.5 break; 1.6 } 1.7 - 1.8 + if(req->reqType == dissipate) 1.9 + { 1.10 + handleDissipate(requestingPr, semEnv); 1.11 + break; 1.12 + } 1.13 req = VMS__take_next_request_out_of( requestingPr ); 1.14 } //while( req != NULL ) 1.15 1.16 @@ -112,8 +116,6 @@ 1.17 break; 1.18 case transfer_out: handleTransferOut( semReq, semEnv); 1.19 break; 1.20 - case malloc_req: handleMalloc( semReq, reqPr, semEnv); 1.21 - break; 1.22 case free_req: handleFree( semReq, reqPr, semEnv); 1.23 break; 1.24 case singleton_fn_start: handleStartFnSingleton(semReq, reqPr, semEnv); 1.25 @@ -141,7 +143,7 @@ 1.26 handleDissipate( VirtProcr *requestingPr, SSRSemEnv *semEnv ) 1.27 { 1.28 //free any semantic data allocated to the virt procr 1.29 - VMS__free( requestingPr->semanticData ); 1.30 + //VMS__free( requestingPr->semanticData ); 1.31 1.32 //Now, call VMS to free_all AppVP state -- stack and so on 1.33 VMS__dissipate_procr( requestingPr );
2.1 --- a/SSR_Request_Handlers.c Mon Aug 29 14:17:43 2011 +0200 2.2 +++ b/SSR_Request_Handlers.c Thu Sep 22 12:01:22 2011 +0200 2.3 @@ -344,18 +344,6 @@ 2.4 2.5 } 2.6 2.7 - 2.8 -/* 2.9 - */ 2.10 -void 2.11 -handleMalloc( SSRSemReq *semReq, VirtProcr *requestingPr, SSRSemEnv *semEnv ) 2.12 - { void *ptr; 2.13 - 2.14 - ptr = VMS__malloc( semReq->sizeToMalloc ); 2.15 - requestingPr->dataRetFromReq = ptr; 2.16 - resume_procr( requestingPr, semEnv ); 2.17 - } 2.18 - 2.19 /* 2.20 */ 2.21 void
3.1 --- a/SSR_Request_Handlers.h Mon Aug 29 14:17:43 2011 +0200 3.2 +++ b/SSR_Request_Handlers.h Thu Sep 22 12:01:22 2011 +0200 3.3 @@ -29,10 +29,6 @@ 3.4 inline void 3.5 handleTransferOut( SSRSemReq *semReq, SSRSemEnv *semEnv); 3.6 inline void 3.7 -handleMalloc( SSRSemReq *semReq, VirtProcr *requestingPr, SSRSemEnv *semEnv); 3.8 -inline void 3.9 -handleFree( SSRSemReq *semReq, VirtProcr *requestingPr, SSRSemEnv *semEnv ); 3.10 -inline void 3.11 handleTransEnd(SSRSemReq *semReq, VirtProcr *requestingPr, SSRSemEnv*semEnv); 3.12 inline void 3.13 handleTransStart( SSRSemReq *semReq, VirtProcr *requestingPr,
4.1 --- a/SSR_lib.c Mon Aug 29 14:17:43 2011 +0200 4.2 +++ b/SSR_lib.c Thu Sep 22 12:01:22 2011 +0200 4.3 @@ -320,15 +320,8 @@ 4.4 4.5 void * 4.6 SSR__malloc_to( int32 sizeToMalloc, VirtProcr *owningPr ) 4.7 - { SSRSemReq reqData; 4.8 - 4.9 - reqData.reqType = malloc_req; 4.10 - reqData.sendPr = owningPr; 4.11 - reqData.sizeToMalloc = sizeToMalloc; 4.12 - 4.13 - VMS__send_sem_request( &reqData, owningPr ); 4.14 - 4.15 - return owningPr->dataRetFromReq; 4.16 + { 4.17 + return VMS__malloc_in_lib(sizeToMalloc, owningPr); 4.18 } 4.19 4.20
