Klauck, Stefan | 14 May 2012 19:45
Picon

DRMAAv2 C binding - Final Draft: Should interface type names get a special ending?

Dear all,

there is another issue I would like to discuss.

(Regarding memory management) There are two kind of functions:

- One the one hand, some functions return drmaa structures with according drmaa2_*_free functions for the
returned pointer. The application has to manage/free these structures.
Examples:
drmaa2_jinfo       drmaa2_j_get_info          (const drmaa2_j j);
drmaa2_jtemplate   drmaa2_j_get_jt            (const drmaa2_j j);

- One the other hand, there are functions returning drmaa interface types (JobSession,
ReservationSession, MonitoringSession, Job, JobArray and Reservation).
Examples:
drmaa2_jsession     drmaa2_create_jsession              (const char * session_name, const char * contact);
drmaa2_j           drmaa2_j_wait_terminated   (const drmaa2_j j, const time_t timeout);

The interface types have according typedef declarations in the header file:

typedef struct drmaa2_jsession_s * drmaa2_jsession;
typedef struct drmaa2_rsession_s * drmaa2_rsession;
typedef struct drmaa2_msession_s * drmaa2_msession;
typedef struct drmaa2_j_s * drmaa2_j;
typedef struct drmaa2_jarray_s * drmaa2_jarray;
typedef struct drmaa2_r_s * drmaa2_r;

The according structures are managed by drmaa implementations.

The issue to discuss:
(Continue reading)

Daniel Gruber | 15 May 2012 08:02

Re: DRMAAv2 C binding - Final Draft: Should interface type names get a special ending?

sounds resaonable

Daniel

Am 14.05.2012 um 19:45 schrieb Klauck, Stefan:

> Dear all,
> 
> there is another issue I would like to discuss.
> 
> 
> 
> (Regarding memory management) There are two kind of functions:
> 
> - One the one hand, some functions return drmaa structures with according drmaa2_*_free functions for
the returned pointer. The application has to manage/free these structures.
> Examples:
> drmaa2_jinfo       drmaa2_j_get_info          (const drmaa2_j j);
> drmaa2_jtemplate   drmaa2_j_get_jt            (const drmaa2_j j);
> 
> 
> - One the other hand, there are functions returning drmaa interface types (JobSession,
ReservationSession, MonitoringSession, Job, JobArray and Reservation).
> Examples:
> drmaa2_jsession     drmaa2_create_jsession              (const char * session_name, const char * contact);
> drmaa2_j           drmaa2_j_wait_terminated   (const drmaa2_j j, const time_t timeout);
> 
> The interface types have according typedef declarations in the header file:
> 
> typedef struct drmaa2_jsession_s * drmaa2_jsession;
(Continue reading)


Gmane